(scripts) adjusted audio switches script to work with both rofi and

fuzzel
This commit is contained in:
quak
2025-08-03 21:55:27 +02:00
parent 31f30d002b
commit 8644417a2c
2 changed files with 8 additions and 2 deletions

View File

@@ -31,7 +31,13 @@ select_audio_sink() {
lines=${#ids[@]}
fi
selection="$(printf "%s\n" "${names[@]//\"/}" | fuzzel --lines ${lines} --dmenu --select-index ${number})"
if $(which rofi &>/dev/null); then
selection="$(printf "%s\n" "${names[@]//\"/}" | rofi -dmenu -fixed-num-lines ${lines} -selected-row ${number} -case-smart)"
elif $(which fuzzel &>/dev/null); then
selection="$(printf "%s\n" "${names[@]//\"/}" | fuzzel --lines ${lines} --dmenu --select-index ${number})"
else
return 1
fi
if [[ -z "${selection}" ]]; then
return 1