summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachIR <zachir@librem.one>2025-07-17 15:38:12 -0500
committerZachIR <zachir@librem.one>2025-07-17 15:38:12 -0500
commitb8f4e3482afa081617b52166113632ba874c4966 (patch)
treeaec96e0591dbbacbaba6c498c0fd2151026d2024
parentccbd3d97c0eeb1865d76ef634047147a8c1bbcf3 (diff)
Fix dmenu script to work with my tofi fork
-rwxr-xr-xdmenu26
1 files changed, 6 insertions, 20 deletions
diff --git a/dmenu b/dmenu
index 31f9f6e..8811b8b 100755
--- a/dmenu
+++ b/dmenu
@@ -1,26 +1,12 @@
#!/bin/sh
TOFI_CONF="$XDG_CONFIG_HOME/tofi/themes/dmenu"
-while getopts "bPrl:p:" o; do case "${o}" in
- "b")
- ARGS="$ARGS --anchor=bottom"
- ;;
- "P")
- ARGS="$ARGS --hide-input=true"
- ;;
- "r")
- ARGS="$ARGS --require-match=true"
- ;;
- "l")
- TOFI_CONF="$XDG_CONFIG_HOME/tofi/themes/dmenu_vertical"
- ;;
- "p")
- ARGS="$ARGS --prompt-text=$OPTARG"
- ;;
- "*")
- notify-send "Unsupported tofi args!" "Unsupported tofi args!"
- ;;
-esac done
+if echo "$@" | grep -qE -- '-l [0-9]+'; then
+ TOFI_CONF="$XDG_CONFIG_HOME/tofi/themes/dmenu_vertical"
+ ARGS="$(echo "$@" | grep -qE -- '-l [0-9]+' | sed 's/-l [0-9]+//' )"
+else
+ ARGS="$@"
+fi
if [ -n "$WAYLAND_DISPLAY" ]; then
# Wayland