fixed buds script
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
"custom/bluetooth-audio",
|
||||
"custom/pixelbuds_pro",
|
||||
"wireplumber",
|
||||
"custom/audio-output",
|
||||
// "custom/audio-output",
|
||||
"network",
|
||||
"cpu",
|
||||
"memory",
|
||||
@@ -55,13 +55,14 @@
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-muted": "Muted ",
|
||||
"format-muted": "{node_name} ",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"default": ["", ""]
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-click-right": "~/.config/waybar/scripts/cycle_audio_output.sh",
|
||||
"scroll-step": 1
|
||||
},
|
||||
|
||||
@@ -161,7 +162,7 @@
|
||||
"custom/bluetooth-audio",
|
||||
// "custom/pixelbuds_pro",
|
||||
"wireplumber",
|
||||
"custom/audio-output",
|
||||
// "custom/audio-output",
|
||||
"network",
|
||||
"cpu",
|
||||
"memory",
|
||||
@@ -206,16 +207,16 @@
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-muted": "Muted ",
|
||||
"format-muted": "{node_name} ",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"default": ["", ""]
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-click-right": "~/.config/waybar/scripts/cycle_audio_output.sh",
|
||||
"scroll-step": 1
|
||||
},
|
||||
|
||||
"custom/bluetooth-audio": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
|
@@ -84,7 +84,7 @@ status() {
|
||||
case "$1" in
|
||||
cycle_anc)
|
||||
current_mode=$(pbpctrl get anc 2>/dev/null)
|
||||
next_mode=""
|
||||
next_mode="active"
|
||||
case "$current_mode" in
|
||||
active)
|
||||
next_mode="aware"
|
||||
@@ -100,10 +100,18 @@ case "$1" in
|
||||
sleep 0.1
|
||||
;;
|
||||
connect)
|
||||
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
|
||||
notify-send "Pixel Buds Pro 2 are already connected"
|
||||
else
|
||||
bluetoothctl connect "$MAC_ADDRESS" & disown
|
||||
fi
|
||||
;;
|
||||
disconnect)
|
||||
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
|
||||
bluetoothctl disconnect "$MAC_ADDRESS" & disown
|
||||
else
|
||||
notify-send "Pixel Buds Pro 2 aren't connected"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
status
|
||||
|
@@ -77,6 +77,12 @@ window#waybar.hidden {
|
||||
color: @text;
|
||||
}
|
||||
|
||||
#wireplumber.muted, #custom-pixelbuds_pro {
|
||||
background-color: @base;
|
||||
color: @subtext1;
|
||||
border-bottom: 3px solid @subtext1;
|
||||
}
|
||||
|
||||
#custom-pixelbuds_pro.anc-active {
|
||||
color: @sapphire;
|
||||
border-bottom: 3px solid @sapphire;
|
||||
|
Reference in New Issue
Block a user