Waybar : Swap sound clicks.

This commit is contained in:
Dmitry Voronin 2024-05-09 00:42:12 +03:00
parent a190f35e8f
commit 4bd377c94d
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 2 additions and 7 deletions

View file

@ -81,7 +81,8 @@ in {
"format-icons": {
"default": ["", "", ""]
},
"on-click": "sound_output_cycle",
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"on-click-middle": "swayscript sound_output_cycle",
"on-click-right": "pavucontrol"
},
"mpris": {

View file

@ -1,11 +1,5 @@
{ ... }: {
text = ''
# Open a sound control panel.
function sound() {
pavucontrol
}
# Cycle output devices.
function sound_output_cycle() {
local IFS=$'\n'
local current=$(pactl get-default-sink)