1
1
mirror of https://github.com/rywng/dotfiles.git synced 2024-10-31 08:01:50 +08:00
dotfiles/.config/sway/scripts/getmute.sh

9 lines
184 B
Bash
Raw Normal View History

2022-08-25 09:45:10 +08:00
#!/bin/sh
if pactl get-sink-mute @DEFAULT_SINK@ | grep -q "yes"
then
echo "0"
else
pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}'
fi