mirror of
https://github.com/artizirk/dotfiles.git
synced 2024-11-22 00:10:59 +02:00
Filter volume changes
This commit is contained in:
parent
6c2002242c
commit
7447134242
10
.bin/volume_subscribe.sh
Executable file
10
.bin/volume_subscribe.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
OLD_VOL=0
|
||||||
|
pactl subscribe | grep --line-buffered "sink" |
|
||||||
|
while read; do
|
||||||
|
VOL=$(amixer get Master | grep -Po "[0-9]+(?=%)" | tail -1)
|
||||||
|
if [[ $VOL != $OLD_VOL ]]; then
|
||||||
|
tvolnoti-show $VOL
|
||||||
|
OLD_VOL=$VOL
|
||||||
|
fi
|
||||||
|
done
|
@ -54,7 +54,7 @@ exec mako --default-timeout 10000
|
|||||||
exec tvolnoti -n -T dark
|
exec tvolnoti -n -T dark
|
||||||
|
|
||||||
# Monitor volume changes
|
# Monitor volume changes
|
||||||
exec pactl subscribe | grep --line-buffered "sink" | xargs -n1 sh -c 'tvolnoti-show $(amixer get Master | grep -Po "[0-9]+(?=%)" | tail -1)'
|
exec ~/.bin/volume_subscribe.sh
|
||||||
|
|
||||||
# Register a fake player in bluez so that volume control would work
|
# Register a fake player in bluez so that volume control would work
|
||||||
exec ~/.bin/fakebluezplayer.py
|
exec ~/.bin/fakebluezplayer.py
|
||||||
|
Loading…
Reference in New Issue
Block a user