diff options
author | zachir <zachir@librem.one> | 2023-02-27 00:21:09 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-02-27 00:21:09 -0600 |
commit | 187a18feb73ac9a1513a6100a1ffdb5f29f3debe (patch) | |
tree | ecbb010c74cc97035c1c091003a4937355d3a01f /dmenu_books | |
parent | 7a1beb8c5d4ce12dd7ede3c4407617f0e81f5a43 (diff) |
change dmenu books, mount/umount, unicode to use bemenu and not need -w -x flag
Diffstat (limited to 'dmenu_books')
-rwxr-xr-x | dmenu_books | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/dmenu_books b/dmenu_books index beb87cc..f24391b 100755 --- a/dmenu_books +++ b/dmenu_books @@ -5,12 +5,23 @@ printhelp () { } while getopts "hwxd:" o; do case "${o}" in - w) DMENU="tofi" ;; + w) DMENU="bemenu" ;; x) DMENU="dmenu" ;; d) ARGS="$ARGS$OPTARG " ;; *) printhelp ;; esac done +if [ -z "$DMENU" ]; then + if [ -n "$WAYLAND_DISPLAY" ]; then + DMENU="bemenu" + elif [ -n "$DISPLAY" ]; then + DMENU="dmene" + else + print "Can't tell if Wayland or X; what gives?\n" + exit 1 + fi +fi + BOOK=`ls ~/Documents/shared | $DMENU $ARGS` [ -z "$BOOK" ] && exit 1 |