14 lines
292 B
Bash
14 lines
292 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [[ "$2" =~ ^[0-9]+$ ]]; then
|
||
|
if [[ "$1" == "input" ]]; then
|
||
|
wpctl set-volume @DEFAULT_AUDIO_SOURCE@ "$2%"
|
||
|
else
|
||
|
wpctl set-volume @DEFAULT_AUDIO_SINK@ "$2%"
|
||
|
fi
|
||
|
else
|
||
|
swayosd-client "--$1-volume" "$2"
|
||
|
fi
|
||
|
|
||
|
eww update volume="$(~/.config/eww/scripts/get-volume.sh)"
|