fix: concat audio and brightness, add notifications
This commit is contained in:
parent
63c6e4214e
commit
64fe6f4e84
14 changed files with 185 additions and 71 deletions
20
eww/scripts/change-volume
Executable file
20
eww/scripts/change-volume
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#! /bin/bash
|
||||
|
||||
set_volume_sink() {
|
||||
pactl set-sink-volume @DEFAULT_SINK@ "$1"
|
||||
CURRENT=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||
dunstify -a "changeVolume" -r 2 -u low -i audio-volume-high -h int:value:"$CURRENT" "Output Volume: ${CURRENT}%"
|
||||
}
|
||||
|
||||
set_volume_source() {
|
||||
pactl set-source-volume @DEFAULT_SOURCE@ "$1"
|
||||
CURRENT=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %')
|
||||
dunstify -a "changeMicVolume" -r 2 -u low -i audio-volume-high -h int:value:"$CURRENT" "Input Volume: ${CURRENT}%"
|
||||
}
|
||||
|
||||
|
||||
if [ "$1" == "sink" ]; then
|
||||
set_volume_sink "$2"
|
||||
elif [ "$1" == "source" ]; then
|
||||
set_volume_source "$2"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue