commit 66301f4f5f1b4a33777ad28d8b60cf662b7ca05b
parent 58a8d7f288fc72e74b2d1adb620262034d22a5b4
Author: Chris Down <chris@chrisdown.name>
Date: Sat, 22 Aug 2015 23:08:48 +0100
Remove ability to override default dmenu lines with CLIPMENU_LINES
If people want to use this, they can just pass `-l <n>` to clipmenu and it will
be passed through to dmenu. I've checked that passing `-l` twice works fine and
accepts the second passed `-l` optarg as the definitive one.
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clipmenu b/clipmenu
@@ -6,7 +6,6 @@ LC_COLLATE=C
# Some people copy/paste huge swathes of text that could slow down dmenu
line_length_limit=500
-dmenu_lines=${CLIPMENU_LINES-8}
declare -A selections
ordered_selections=()
@@ -30,8 +29,7 @@ for (( i=${#files[@]}-1; i>=0; i-- )); do
done
chosen_line=$(
- printf '%s\n' "${ordered_selections[@]}" |
- awk '!x[$0]++' | dmenu -l "$dmenu_lines" "$@"
+ printf '%s\n' "${ordered_selections[@]}" | awk '!x[$0]++' | dmenu -l 8 "$@"
)
[[ $chosen_line ]] || exit 1