FollieHiyuki-dotfiles/home/.local/bin/info/pulse
2021-02-13 19:28:59 +03:00

15 lines
303 B
Bash
Executable File

#!/bin/sh
mute=$(pulsemixer --get-mute)
if [ "$mute" -eq 1 ] || [ "$mute" = "true" ]
then
echo "婢 muted"
else
volume=$(pulsemixer --get-volume)
left=$(echo "$volume" | cut -d' ' -f1)
right=$(echo "$volume" | cut -d' ' -f2)
average=$(((left+right)/2))
echo "$average%"
fi