summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/pancake/config.yaml68
-rw-r--r--.config/pancake/unclutter/duckduckgo.xsl24
-rw-r--r--.config/pancake/unclutter/hacker-news.xsl33
-rw-r--r--.config/pancake/unclutter/lobsters.xsl20
4 files changed, 145 insertions, 0 deletions
diff --git a/.config/pancake/config.yaml b/.config/pancake/config.yaml
new file mode 100644
index 0000000..33d01ec
--- /dev/null
+++ b/.config/pancake/config.yaml
@@ -0,0 +1,68 @@
+externalViewers:
+ ogg: xdg-open "${FILE}"
+ xspf: xdg-open "${FILE}"
+ jpg: xdg-open "${FILE}"
+ cabal: emacsclient -n "${FILE}"
+ jpeg: xdg-open "${FILE}"
+ gif: xdg-open "${FILE}"
+ hs: emacsclient -n "${FILE}"
+ mp3: xdg-open "${FILE}"
+ el: emacsclient -n "${FILE}"
+ idr: emacsclient -n "${FILE}"
+ mpeg: xdg-open "${FILE}"
+ svg: xdg-open "${FILE}"
+ pdf: xdg-open "${FILE}"
+ scm: emacsclient -n "${FILE}"
+ webm: xdg-open "${FILE}"
+ h: emacsclient -n "${FILE}"
+ wav: xdg-open "${FILE}"
+ mkv: xdg-open "${FILE}"
+ c: emacsclient -n "${FILE}"
+ m3u: xdg-open "${FILE}"
+ ogv: xdg-open "${FILE}"
+ mp4: xdg-open "${FILE}"
+ png: xdg-open "${FILE}"
+indentDivs: false
+commands:
+ gopher: ! 'curl "${URI}" -w "
+
+ -pancake-
+
+ "'
+ ssh: ! 'scp "${URI_REGNAME}:${URI_PATH}" /dev/stdout && echo -e ''
+
+ -pancake-'''
+ web-archive: ! 'curl --compressed -4 -L -w "
+
+ -pancake-
+
+ uri: %{url_effective}
+
+ type: %{content_type}
+
+ " "$(curl "https://archive.org/wayback/available${URI_QUERY}" | jq -r ''.archived_snapshots.closest.url'')"'
+referenceDigits: 'rstwfpxcvaqzdgb'
+shortcuts:
+ g: https://m.gutenberg.org/ebooks/search.mobile/?query=
+ ddg: https://duckduckgo.com/lite/?q=
+ wt: https://en.m.wiktionary.org/w/index.php?search=
+ wa: web-archive:///?url=
+ wp: https://en.m.wikipedia.org/wiki/Special:Search?search=
+ gp: gopher://gopherpedia.com:70/7/lookup?
+ vs: gopher://gopher.floodgap.com/7/v2/vs?
+ xiph: http://dir.xiph.org/search?search=
+unclutter:
+ hacker-news: ^https://news\.ycombinator\.com/((news|show|ask).*)?$
+ duckduckgo: ^https://duckduckgo.com/lite/\?q=
+ lobsters: ^https://lobste.rs/((page|recent|newest).*)?$
+defaultCommand: ! 'curl --compressed -4 -L -w "
+
+ -pancake-
+
+ uri: %{url_effective}
+
+ type: %{content_type}
+
+ " "${URI}"'
+historyDepth: 100
+paginate: true
diff --git a/.config/pancake/unclutter/duckduckgo.xsl b/.config/pancake/unclutter/duckduckgo.xsl
new file mode 100644
index 0000000..7db8766
--- /dev/null
+++ b/.config/pancake/unclutter/duckduckgo.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <body>
+ DuckDuckGo
+ <xsl:for-each select="//tr[not(@class) or @class!='result-sponsored']">
+ <xsl:for-each select="td/a[@class='result-link']">
+ <br />
+ <br />
+ <a href="{@href}">
+ <xsl:value-of select="." />
+ </a>
+ </xsl:for-each>
+ <xsl:for-each select="td[@class='result-snippet']">
+ <br />
+ <xsl:value-of select="." />
+ </xsl:for-each>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/.config/pancake/unclutter/hacker-news.xsl b/.config/pancake/unclutter/hacker-news.xsl
new file mode 100644
index 0000000..0e1fb63
--- /dev/null
+++ b/.config/pancake/unclutter/hacker-news.xsl
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <body>
+ Hacker News
+ <xsl:for-each select="//td[@class='title' or @class='subtext']">
+ <xsl:choose>
+ <xsl:when test="@class = 'title'">
+ <xsl:variable name="uri" select="a/@href"/>
+ <xsl:if test="$uri!=''">
+ <br />
+ <br />
+ <a href="{$uri}" >
+ <xsl:value-of select="a" />
+ </a>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="@class = 'subtext'">
+ <br/>
+ <xsl:value-of select="span[@class='age']" />
+ |
+ <a href="{a[last()]/@href}">
+ <xsl:value-of select="a[last()]" />
+ </a>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/.config/pancake/unclutter/lobsters.xsl b/.config/pancake/unclutter/lobsters.xsl
new file mode 100644
index 0000000..69a85a1
--- /dev/null
+++ b/.config/pancake/unclutter/lobsters.xsl
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <body>
+ Lobsters
+ <xsl:for-each select="//div[@class='details']">
+ <p>
+ <xsl:copy-of select="span[@class='link']/a" />
+ <br/>
+ <xsl:value-of select="div[@class='byline']/span[position()=1]" />
+ |
+ <xsl:copy-of select="div[@class='byline']/span[@class='comments_label']/a" />
+ </p>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>