commit 3da2885e7b51f5473a8151486b3d0609be67015d
parent eaf4a482b6981ae9f072e3ea56b6e01e3b916587
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 11 Jun 2019 09:33:33 +0200
Add smbc script and run programs in tmux
Diffstat:
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.config/newsboat/config b/.config/newsboat/config
@@ -69,3 +69,4 @@ macro y set browser "echo -n %u | xclip -selection clipboard" ; open-in-browser
macro p set browser "wkhtmltopdf %u out.pdf && mv out.pdf ~/tmp/$(basename $(mktemp)).pdf" ; open-in-browser ; set browser xdg-open
macro u set browser "curl -L %u | grep -i '\.pdf' | urlview" ; open-in-browser ; set browser xdg-open
macro s set browser "cd ~/tmp && tsp shdl -t -n -o %u" ; open-in-browser ; set browser xdg-open
+macro c set browser "cd ~/tmp && smbc %u" ; open-in-browser ; set browser xdg-open
diff --git a/.config/newsboat/urls b/.config/newsboat/urls
@@ -144,3 +144,4 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCUC_2Z23y5wGOVG2X1ulCCg you
https://www.youtube.com/feeds/videos.xml?channel_id=UCR4s1DE9J4DHzZYXMltSMAg youtube "~youtube: HowToBasic"
https://www.youtube.com/feeds/videos.xml?channel_id=UCRUq9jueekA0t4uz_z5LZmA youtube "~youtube: ToolArchive"
https://www.youtube.com/feeds/videos.xml?channel_id=UCY2mhw-XNZSxrUynsI5K8Zw youtube "~youtube: TheLouisianaChannel"
+https://www.youtube.com/feeds/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A youtube "~youtube: Numberphile"
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
@@ -75,9 +75,9 @@ super + t
super + alt + t
textqr
super + y
- $TERMINAL -e youtube-viewer
+ $TERMINAL -e tmux new-session youtube-viewer
super + shift + y
- $TERMINAL -e youtube-viewer --novideo
+ $TERMINAL -e tmux new-session youtube-viewer --novideo
super + c
$TERMINAL -e calcurse -D ~/.config/calcurse
diff --git a/.local/bin/smbc b/.local/bin/smbc
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -eu
+
+url="${1:-https://www.smbc-comics.com/}"
+f="$(curl -s --write-out "%{filename_effective}\n" -OL \
+"$(curl -s -L "$url" | \
+grep '.png' | sed 1q | sed 's/^.*https/https/;s/".*$//')")"
+
+xdg-open "$f"
+rm "$f"