(scripts) adjusted audio switches script to work with both rofi and
fuzzel
This commit is contained in:
@@ -170,7 +170,7 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT
|
|||||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
|
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
|
||||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||||
bindsym $mod+a exec --no-startup-id bash select-audio-sink.sh
|
bindsym $mod+a exec --no-startup-id bash audio-sink-switcher.sh
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
|||||||
@@ -31,7 +31,13 @@ select_audio_sink() {
|
|||||||
lines=${#ids[@]}
|
lines=${#ids[@]}
|
||||||
fi
|
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
|
if [[ -z "${selection}" ]]; then
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user