aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBaitinq <30861839+Baitinq@users.noreply.github.com>2021-12-14 12:22:13 +0000
committerGitHub <noreply@github.com>2021-12-14 12:22:13 +0000
commit0e8e7ab63d02f4c220532e1c6aa4da5843d748ed (patch)
tree34f16075b73ee02ad64d91f3fe7eccd58baf7aa6 /modules
parentd68a1e337236fe00cb0390501412ad3d34b0f5a5 (diff)
Update volume module to work with any default sink
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/volume5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/volume b/modules/volume
index f09e5a6..6b5b96e 100755
--- a/modules/volume
+++ b/modules/volume
@@ -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