config/eww ahrc-laptop : ajout scripts son

This commit is contained in:
Ahurac 2024-05-31 14:49:04 +02:00
parent 9eb26b34d2
commit c17b852b39
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#!/usr/bin/env sh
case "$1" in
up)
set -- -i
;;
down)
set -- -d
;;
*)
;;
esac
set -- pamixer "$@" 5
exec "$@"

View file

@ -0,0 +1,7 @@
#!/usr/bin/env sh
pactl subscribe | grep --line-buffered "'change'" | while read -r _unused; do
printf '{"output-volume":%s,"input-volume":%s,"output-muted":%s}\n' \
"$(pamixer --get-volume)" \
"$(pamixer --get-volume --default-source)" \
"$(pamixer --get-mute)"
done