mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 03:37:10 -04:00
19 lines
285 B
Bash
Executable file
19 lines
285 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
SINK="@DEFAULT_AUDIO_SINK@"
|
|
STATUSBAR="modbot"
|
|
STATUSBAR_SIGNAL=1
|
|
|
|
action=$1
|
|
|
|
if [ "$action" = "toggle" ]; then
|
|
wpctl set-mute "$SINK" toggle
|
|
else
|
|
wpctl set-mute "$SINK" 0
|
|
wpctl set-volume "$SINK" -l 1 "$action"
|
|
fi
|
|
|
|
pkill -RTMIN+"$STATUSBAR_SIGNAL" "$STATUSBAR"
|