nix-config/modules/wm/hyprland/config/eww/scripts/volume.sh
2025-04-14 00:46:57 +02:00

15 lines
277 B
Bash
Executable file

#!/bin/sh
volume=$(($(wpctl get-volume @DEFAULT_SINK@ | sed -r 's/Volume: (0|1)\.(..)/\1\2/; s/^(0)//g')))
if (( $volume == 0 )); then
echo 'images/sound-off.svg'
exit 0
fi
if (( $volume < 20 )); then
echo 'images/sound-lo.svg'
exit 0
fi
echo 'images/sound-hi.svg'