diff options
| author | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
|---|---|---|
| committer | coasteen <coasteen@proton.me> | 2026-07-09 10:42:28 +0330 |
| commit | 8cbadb61604667b407b53ee1258433994fa4765a (patch) | |
| tree | 97765fb29418fd6278fcb4cbb9760893afaf7a58 /slstatus/components/pixVol.sh | |
Diffstat (limited to 'slstatus/components/pixVol.sh')
| -rwxr-xr-x | slstatus/components/pixVol.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/slstatus/components/pixVol.sh b/slstatus/components/pixVol.sh new file mode 100755 index 0000000..8f59505 --- /dev/null +++ b/slstatus/components/pixVol.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '\d+%' | head -n 1 | tr -d '%') +muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') + +if [ "$muted" = "yes" ]; then + echo "Muted" +else + echo "${volume}" +fi |
