nicks-nix-config/modules/ewwbar/eww-config/scripts/volume
2023-10-30 18:12:43 -07:00

12 lines
261 B
Bash
Executable file

#!/bin/sh
case $1 in
"*") command="";;
"up") command="change +2%";;
"down") command="change -1.5%";;
"toggle") command="mute toggle";;
esac
[ -n "$command" ] && pw-volume $command
$2 update volume=$(pw-volume status | jq '.percentage // 0')