dotfiles/yambar/scripts/hyprland_ws.sh
2026-05-13 21:05:39 +02:00

15 lines
416 B
Bash
Executable file

#!/bin/sh
while true; do
special=$(hyprctl monitors -j | jq -r '.[] | select(.name == "eDP-1") | .specialWorkspace.name // empty')
if [ -n "$special"]; then
ws=$(hyprctl activeworkspace -j 2>/dev/null | jq -r '.id')
ws_display=$((ws - 1)) # ← SOUMI 1 pour index 0-based
echo "ws|string|$ws_display"
echo ""
else
echo "ws|string|🌌"
echo ""
fi
sleep 0.25
done