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

21
hypr/2d-workspaces.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# ~/.config/hypr/2d-workspaces.sh
# Outputs current 2D position as Waybar JSON: "3" or "3.2"
current=$(hyprctl activeworkspace -j | jq -r '.name')
if [[ "$current" =~ ^([0-9]+)-([0-9]+)$ ]]; then
cx="${BASH_REMATCH[1]}"
cy="${BASH_REMATCH[2]}"
label="${cx}.${cy}"
class="sub"
elif [[ "$current" =~ ^([0-9]+)$ ]]; then
cx="${BASH_REMATCH[1]}"
label="${cx}"
class="base"
else
label="?"
class="unknown"
fi
printf '{"text": "%s", "class": "%s"}\n' "$label" "$class"