2024-04-06 03:03:58 +03:00
|
|
|
{ ... }: {
|
|
|
|
text = ''
|
2024-05-04 13:54:42 +03:00
|
|
|
function sound_output_cycle() {
|
|
|
|
local IFS=$'\n'
|
|
|
|
local current=$(pactl get-default-sink)
|
|
|
|
local all=($(pactl list short sinks | cut -f2))
|
|
|
|
local i_current=$(_index_of ''${current} ''${all})
|
|
|
|
local i_total=''${#all[@]}; ((i_total--))
|
|
|
|
local i_target=0
|
|
|
|
|
|
|
|
[[ "''${i_current}" -lt "''${i_total}" ]] && i_target=$((i_current+1))
|
|
|
|
|
|
|
|
pactl set-default-sink ''${all[''${i_target}]}
|
|
|
|
}
|
2024-04-06 03:03:58 +03:00
|
|
|
'';
|
|
|
|
}
|