waybar scripts

This commit is contained in:
2026-08-02 16:44:59 -05:00
parent 7da3a1a663
commit e58013fb54
3 changed files with 45 additions and 4 deletions
+18 -3
View File
@@ -35,9 +35,24 @@
"format": "{:%d.%m.%Y | %H:%M:%S}",
"interval": 1
},
"wireplumber": {
"format": "\udb81\udd7e {volume}%",
"max-volume": 100,
"wireplumber#sink": {
"format": "{icon} {volume}%",
"format-muted": "\uf6a9",
"format-icons": [
"\uf026",
"\uf027",
"\uf028"
],
"on-click": "~/.config/waybar/scripts/select-sink.sh",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"scroll-step": 5
},
"wireplumber#source": {
"node-type": "Audio/Source",
"format": "\uf130 {volume}%",
"format-muted": "\uf131",
"on-click": "~/.config/waybar/scripts/select-source.sh",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
"scroll-step": 5
},
"battery": {
+13
View File
@@ -0,0 +1,13 @@
sink=$(
pw-dump |
jq -r '
.[]
| select(.type == "PipeWire:Interface:Node")
| select(.info.props["media.class"] == "Audio/Sink")
| "\(.id)\t\(.info.props["node.description"] // .info.props["node.name"])"
' |
wofi --dmenu |
cut -f1
)
[ -n "$sink" ] && wpctl set-default "$sink"
+13
View File
@@ -0,0 +1,13 @@
sink=$(
pw-dump |
jq -r '
.[]
| select(.type == "PipeWire:Interface:Node")
| select(.info.props["media.class"] == "Audio/Source")
| "\(.id)\t\(.info.props["node.description"] // .info.props["node.name"])"
' |
wofi --dmenu |
cut -f1
)
[ -n "$sink" ] && wpctl set-default "$sink"