diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2010-10-02 15:52:00 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2010-10-02 15:52:00 -0400 |
commit | 505114b665757bace138f54b6bba22869f6835f6 (patch) | |
tree | 00be76b51a948e0f778d168b6d8ad5338c1d69f1 /examples/data/scripts/util | |
parent | 5745a8f9f37fb233f1d5e1b7e1be3c8f8db7be54 (diff) |
Make vertical mode an option even if found
Diffstat (limited to 'examples/data/scripts/util')
-rw-r--r-- | examples/data/scripts/util/dmenu.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/data/scripts/util/dmenu.sh b/examples/data/scripts/util/dmenu.sh index 9890b02..8113c3b 100644 --- a/examples/data/scripts/util/dmenu.sh +++ b/examples/data/scripts/util/dmenu.sh @@ -73,12 +73,21 @@ if dmenu --help 2>&1 | grep -q '\[-l <lines>\]'; then DMENU_LINES=10 fi - DMENU_ARGS="$DMENU_ARGS -l $DMENU_LINES" + DMENU_VERTICAL_ARGS="-l $DMENU_LINES" DMENU_HAS_VERTICAL=1 # Detect the resize patch if dmenu --help 2>&1 | grep -q '\[-rs\]'; then - DMENU_ARGS="$DMENU_ARGS -rs" + DMENU_RESIZE_ARGS="-rs" + DMENU_HAS_RESIZE=1 + fi + + if echo $DMENU_OPTIONS | grep -q -w 'vertical'; then + DMENU_ARGS="$DMENU_ARGS $DMENU_VERTICAL_ARGS" + + if echo $DMENU_OPTIONS | grep -q -w 'resize'; then + DMENU_ARGS="$DMENU_ARGS $DMENU_RESIZE_ARGS" + fi fi fi |