mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-22 21:22:52 +00:00
Update volume module to work with any default sink
This commit is contained in:
parent
d68a1e3372
commit
0e8e7ab63d
1 changed files with 2 additions and 3 deletions
|
@ -6,9 +6,8 @@ VOLUME_ON_ICON=''
|
|||
VOLUME_MUTED_ICON=''
|
||||
|
||||
get_volume(){
|
||||
active_sink=$(pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1)
|
||||
curStatus=$(pactl get-sink-mute $active_sink)
|
||||
volume=$(pactl get-sink-volume $active_sink | tail -n 2 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n 1)
|
||||
curStatus=$(pactl get-sink-mute @DEFAULT_SINK@)
|
||||
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | tail -n 2 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n 1)
|
||||
|
||||
if [ "${curStatus}" = 'Mute: yes' ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue