commit fd4fa7323260547b57f5a9de6c71f82455d456c7
parent de879985c9f87510f5d2b062ad4fcae7d72c9320
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 8 May 2019 15:18:33 -0700
Update redshift location, add newsboat binding for downloading pdfs from webpage
Diffstat:
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/.config/newsboat/config b/.config/newsboat/config
@@ -67,4 +67,5 @@ macro r set browser "rtv"; open-in-browser ; toggle-article-read ; set browser x
# macro p set browser "dmenuhandler"; open-in-browser ; set browser xdg-open
macro y set browser "echo -n %u | xclip -selection clipboard" ; open-in-browser ; set browser xdg-open
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
diff --git a/.xinitrc b/.xinitrc
@@ -28,7 +28,8 @@ xbindkeys
if [ "$(hostname)" != "phony" ]; then
# default temperature is 6500 K day, 4500 K night
- redshift -l 56.09:10.12 -t 7500:3300 & # Aarhus
+ #redshift -l 56.09:10.12 -t 7500:3300 & # Aarhus
+ redshift -l 37.25:-122.9 -t 7500:3300 & # Stanford
#redshift -l 32.84:-117.26 & # San Diego
fi
diff --git a/bin/linkhandler b/bin/linkhandler
@@ -19,6 +19,8 @@ for url in "$@"; do
elif [ "$action" = "Copy" ]; then
echo "$url" | xclip
elif [ "$action" = "Download" ]; then
+ mkdir -p ~/tmp/
+ cd ~/tmp/ || exit
setsid tsp curl -LO "$url" >/dev/null 2>&1 &
elif [ "$action" = "Sci-Hub" ]; then
setsid tsp shdl --tor-socks --notify --open --reference "$url" >/dev/null 2>&1 &