summaryrefslogtreecommitdiffstats
path: root/.local/bin/opendoc
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@mailbox.org>2023-08-25 17:55:32 +0200
committerJustin Gassner <justin.gassner@mailbox.org>2023-09-18 12:39:47 +0200
commit159003fd48ef797dc9ef9d52fc753bec8d8ff72b (patch)
treeff542e87318854a46c93a73d3d1ce202929a1947 /.local/bin/opendoc
parentafb499d81dc22ccc00fbd999862360a3e6f16cdb (diff)
downloaddotfiles-159003fd48ef797dc9ef9d52fc753bec8d8ff72b.tar.zst
configx1
Diffstat (limited to '.local/bin/opendoc')
-rwxr-xr-x.local/bin/opendoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/.local/bin/opendoc b/.local/bin/opendoc
new file mode 100755
index 0000000..5641763
--- /dev/null
+++ b/.local/bin/opendoc
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+cd ~/library/ || exit 1
+file=$(find . \( -iname '*.pdf' -or -iname '*djvu' \) -type f \
+ -printf '%P\n' | sort | dmenu -i -l 10)
+if test -f "$file"; then
+ zathura "$file" &
+fi