Switching from dunst to qtile's notifications in the status bar.

This commit is contained in:
Bartek Stalewski 2022-10-18 17:13:21 +02:00
parent 0f49c1f23b
commit b45a8b3c70
5 changed files with 17 additions and 6 deletions

View file

@ -1,12 +1,13 @@
#!/bin/bash
icon='\uf028'
if [ $1 ]; then
case $1 in
inc) pactl set-sink-volume @DEFAULT_SINK@ +5%;;
dec) pactl set-sink-volume @DEFAULT_SINK@ -5%;;
esac
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk -F' / *' '{print $2}')
dunstify -h int:value:$volume -r 20 -t 800 "volume: $volume"
notify-send -t 1000 " volume: $volume"
else
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute="<span foreground='#ffffff' background='#770000'> \uf131 </span> " || micmute=""