eww widgets and theme cycle with waybar button
This commit is contained in:
11
eww/scripts/get-sinks.sh
Executable file
11
eww/scripts/get-sinks.sh
Executable 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 '.'
|
||||
6
eww/scripts/toggle-mixer.sh
Executable file
6
eww/scripts/toggle-mixer.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
if eww active-windows | grep -q "volume-mixer"; then
|
||||
eww close volume-mixer
|
||||
else
|
||||
eww open volume-mixer
|
||||
fi
|
||||
Reference in New Issue
Block a user