summaryrefslogtreecommitdiff
path: root/dmenu_books
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-08-16 13:20:22 -0500
committerzachir <zachir@librem.one>2023-08-16 13:20:22 -0500
commit6e72884bb5d0d046b37df86aedad33f0f60557f3 (patch)
treecb526bc6fd07e6f0b7bc3f69dfa6479da21ba9d4 /dmenu_books
parent83621322fe4697ff4cf76bade8014bfaa8574af9 (diff)
We use tofi now, it's fixed
Diffstat (limited to 'dmenu_books')
-rwxr-xr-xdmenu_books24
1 files changed, 11 insertions, 13 deletions
diff --git a/dmenu_books b/dmenu_books
index 130cbc9..8017437 100755
--- a/dmenu_books
+++ b/dmenu_books
@@ -4,25 +4,23 @@ printhelp () {
exit
}
-while getopts "hwxd:" o; do case "${o}" in
- w) DMENU="bemenu" ;;
- x) DMENU="dmenu" ;;
+while getopts "hd:" o; do case "${o}" in
d) ARGS="$ARGS$OPTARG " ;;
*) printhelp ;;
esac done
-if [ -z "$DMENU" ]; then
- if [ -n "$WAYLAND_DISPLAY" ]; then
- DMENU="bemenu"
- elif [ -n "$DISPLAY" ]; then
- DMENU="dmenu"
- else
- print "Can't tell if Wayland or X; what gives?\n"
- exit 1
- fi
+if [ -n "$WAYLAND_DISPLAY" ]; then
+ DMENU="tofi"
+ DEFARGS="-c $HOME/.config/tofi/themes/dmenu_vertical --prompt-text"
+elif [ -n "$DISPLAY" ]; then
+ DMENU="dmenu"
+ DEFARGS="-l 15 -p"
+else
+ print "Can't tell if Wayland or X; what gives?\n"
+ exit 1
fi
-BOOK=`ls ~/Documents/shared | $DMENU $ARGS`
+BOOK=`ls ~/Documents/shared | $DMENU $DEFARGS \"books\" $ARGS`
[ -z "$BOOK" ] && exit 1