Fix picker argument passing

Fixed passing arguments to bemenu and dmenu correctly, to allow setting
custom options for them on the command line.

Removed redundant argument passing for rofi.
This commit is contained in:
Marty Oehme 2022-01-28 10:38:55 +01:00
parent 6dc0cd6d16
commit d3965e903a
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -60,11 +60,11 @@ _picker() {
if [ -n "$PICKER_BACKEND" ]; then
"${PICKER_BACKEND[@]}"
elif command -v rofi 1>/dev/null 2>/dev/null; then
rofi -dmenu -no-auto-select -i "${rofi_opts[@]}" "$@" -p "entry"
rofi -dmenu -no-auto-select -i "${rofi_opts[@]}" -p "entry"
elif command -v bemenu 1>/dev/null 2>/dev/null; then
bemenu -l 20 -i -p "entry >"
bemenu -l 20 -i "${rofi_opts[@]}" -p "entry >"
elif command -v dmenu 1>/dev/null 2>/dev/null; then
dmenu -i -p "entry >"
dmenu -i "${rofi_opts[@]}" -p "entry >"
else
printf "%s: 📦 %s must be installed for %s function.\n" "critical" "rofi/bemenu/dmenu" "this" >&2
notify-send "📦 rofi/bemenu/dmenu" --urgency="critical" "must be installed for this function."