summaryrefslogtreecommitdiff
path: root/dmenuunicode
diff options
context:
space:
mode:
Diffstat (limited to 'dmenuunicode')
-rwxr-xr-xdmenuunicode24
1 files changed, 11 insertions, 13 deletions
diff --git a/dmenuunicode b/dmenuunicode
index 4af8870..ef7a63d 100755
--- a/dmenuunicode
+++ b/dmenuunicode
@@ -6,26 +6,24 @@ 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"
+elif [ -n "$DISPLAY" ]; then
+ DMENU="dmenu "
+ DEFARGS="-l 10"
+else
+ print "Can't tell if Wayland or X; what gives?\n"
+ exit 1
fi
# Get user selection via dmenu -i -l 30 from emoji file.
-chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | $DMENU -l 10 $ARGS | sed "s/ .*//")
+chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | $DMENU $DEFARGS $ARGS | sed "s/ .*//")
# Exit if none chosen.
[ -z "$chosen" ] && exit