feat(eww): add config

This commit is contained in:
2026-03-12 17:42:32 +01:00
parent adeb93bd24
commit c6eaad94ef
11 changed files with 1128 additions and 0 deletions

29
eww/scripts/popup.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# toggle an eww popup
# opens on the currently focused monitor
POPUPS=(system-popup battery-popup network-popup vpn-popup volume-popup bluetooth-popup keyboard-popup media-popup)
target="$1"
if [[ -z "$target" ]]; then
echo "usage: popup.sh <popup-name|close-all>" >&2
exit 1
fi
if [[ "$target" == "close-all" ]]; then
eww close "${POPUPS[@]}" 2>/dev/null
exit 0
fi
# check if target is already open
if eww active-windows 2>/dev/null | grep -q "$target"; then
eww close "$target" 2>/dev/null
else
# close others, open popup
screen=$(swaymsg -t get_outputs 2>/dev/null \
| jq '[.[] | .focused] | index(true) // 0')
eww close "${POPUPS[@]}" 2>/dev/null
eww open --screen "${screen:-0}" "$target"
fi