summaryrefslogtreecommitdiff
path: root/dmenu_books
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2025-07-15 21:01:25 -0500
committerzachir <zachir@librem.one>2025-07-15 21:01:25 -0500
commit728bfc73a762bc53f843e3c7c15700ad3bf0a7f3 (patch)
tree82e49a3a51e2d6b9c45ee5758dacafa204c648e0 /dmenu_books
parent7078e8ec74cf1fc02b041134fd57caf40506ef78 (diff)
Move some of my scripts out of bin to here
Diffstat (limited to 'dmenu_books')
-rwxr-xr-xdmenu_books19
1 files changed, 19 insertions, 0 deletions
diff --git a/dmenu_books b/dmenu_books
new file mode 100755
index 0000000..3b6f1fe
--- /dev/null
+++ b/dmenu_books
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+printhelp () {
+ exit
+}
+
+while getopts "hd:" o; do case "${o}" in
+ d) ARGS="$ARGS$OPTARG " ;;
+ *) printhelp ;;
+esac done
+
+DMENU="dmenu"
+DEFARGS="-l 15 -p"
+
+BOOK=`ls ~/Documents/shared | $DMENU $DEFARGS \"books\" $ARGS`
+
+[ -z "$BOOK" ] && exit 1
+
+zathura "~/Documents/shared/$BOOK"