pkgs: add change-audio
This commit is contained in:
parent
10b8ee50c1
commit
f987e79d17
3 changed files with 63 additions and 0 deletions
17
pkgs/change-audio/change-audio
Executable file
17
pkgs/change-audio/change-audio
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$1" = "up" ]; then
|
||||
upDown="-i"
|
||||
else
|
||||
upDown="-d"
|
||||
fi
|
||||
|
||||
pamixer --allow-boost "$upDown" "$2"
|
||||
newVolume="$(pamixer --get-volume)"
|
||||
|
||||
notify-send -u low \
|
||||
-h string:x-canonical-private-synchronous:change-audio \
|
||||
-h "int:value:$newVolume" \
|
||||
-- "Set volume to $newVolume%"
|
||||
Loading…
Add table
Add a link
Reference in a new issue