From 728bfc73a762bc53f843e3c7c15700ad3bf0a7f3 Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 15 Jul 2025 21:01:25 -0500 Subject: Move some of my scripts out of bin to here --- dmenu_books | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 dmenu_books (limited to 'dmenu_books') 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" -- cgit v1.2.3