waybar: Kill pavucontrol
on click if already open
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
bcce29e087
commit
6286ab533c
|
@ -45,7 +45,7 @@
|
||||||
"default": ["", "", ""]
|
"default": ["", "", ""]
|
||||||
},
|
},
|
||||||
"scroll-step": 10,
|
"scroll-step": 10,
|
||||||
"on-click": "pavucontrol",
|
"on-click": "~/.config/waybar/modules/pavucontrol.sh",
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
"custom/spotify": {
|
"custom/spotify": {
|
||||||
|
|
7
waybar/modules/pavucontrol.sh
Executable file
7
waybar/modules/pavucontrol.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
if pgrep pavucontrol; then
|
||||||
|
pkill pavucontrol
|
||||||
|
else
|
||||||
|
exec pavucontrol
|
||||||
|
fi
|
Reference in a new issue