aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles')
-rw-r--r--dotfiles/.config/mimeo/associations.txt4
-rwxr-xr-xdotfiles/.local/bin/bookurl7
2 files changed, 11 insertions, 0 deletions
diff --git a/dotfiles/.config/mimeo/associations.txt b/dotfiles/.config/mimeo/associations.txt
index 5b3f604..9e5f577 100644
--- a/dotfiles/.config/mimeo/associations.txt
+++ b/dotfiles/.config/mimeo/associations.txt
@@ -13,6 +13,10 @@ imgurl %U
^https?://.*\.gif
^https?://.*\.bmp
+bookurl %U
+ ^https?://.*\.pdf
+ ^https?://.*\.djvu
+
libreoffice %F
\.doc
\.docx
diff --git a/dotfiles/.local/bin/bookurl b/dotfiles/.local/bin/bookurl
new file mode 100755
index 0000000..c97b039
--- /dev/null
+++ b/dotfiles/.local/bin/bookurl
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ -z "$1" ] && exit
+
+setsid curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 &
+
+