Switching from dunst to qtile's notifications in the status bar.
This commit is contained in:
parent
0f49c1f23b
commit
b45a8b3c70
5 changed files with 17 additions and 6 deletions
|
@ -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=""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue