summaryrefslogtreecommitdiffstats
path: root/.local/bin/opendoc
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@mailbox.org>2024-01-10 13:29:11 +0100
committerJustin Gassner <justin.gassner@mailbox.org>2024-01-10 13:29:11 +0100
commit0dfdabd3d7c2aaee37900103c37a96317f3ada07 (patch)
treefe27ea564b60cf6e75b7f2dc3dc8bb57d78a3884 /.local/bin/opendoc
parent2a610aeff4a33456c03f0c8db1469cdc95ba1e73 (diff)
downloaddotfiles-0dfdabd3d7c2aaee37900103c37a96317f3ada07.tar.zst
config
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..5fb73e0
--- /dev/null
+++ b/.local/bin/opendoc
@@ -0,0 +1,8 @@
+#!/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
+ zathura "$file" &
+fi