eww widgets and theme cycle with waybar button

This commit is contained in:
samantha42
2026-04-19 08:55:14 +02:00
parent 39f39701a7
commit 22eb9ddc46
20 changed files with 932 additions and 150 deletions

11
eww/scripts/get-sinks.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# Get all sink inputs as JSON array for eww
pactl list sink-inputs | awk '
/^Sink Input/ { id=substr($3,2,length($3)-1) }
/application.name/ { gsub(/"/,"",$3); name=$3 }
/Volume:.*%/ {
match($0, /[0-9]+%/)
vol=substr($0,RSTART,RLENGTH-1)
printf "{\"id\":\"%s\",\"name\":\"%s\",\"volume\":\"%s\"}\n", id, name, vol
name=""; vol=""
}' | jq -s '.'