summaryrefslogtreecommitdiffstats
path: root/.local/bin/opendoc
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/opendoc')
-rwxr-xr-x.local/bin/opendoc16
1 files changed, 16 insertions, 0 deletions
diff --git a/.local/bin/opendoc b/.local/bin/opendoc
new file mode 100755
index 0000000..c0930cb
--- /dev/null
+++ b/.local/bin/opendoc
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+cd ~/library/ || exit 1
+file=$(find -L . \( -iname '*.pdf' -or -iname '*djvu' \) -type f \
+ -printf '%P\n' | sort | dmenu -i -l 10)
+if test -f "$file"; then
+ case "$file" in
+ *.pdf)
+ zathura "$file" &
+ #sioyek "$file" &
+ ;;
+ *.djvu)
+ zathura "$file" &
+ ;;
+ esac
+fi