fix: concat audio and brightness, add notifications

This commit is contained in:
Fabio Lenherr 2022-09-04 00:14:34 +02:00
parent 63c6e4214e
commit 64fe6f4e84
No known key found for this signature in database
GPG key ID: 868FFD689D878939
14 changed files with 185 additions and 71 deletions

20
eww/scripts/change-volume Executable file
View 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