Files
nixos/Droidnix/generated/.config/waybar/scripts/hyprscroll-overflow.sh
T
2026-04-02 17:37:48 +02:00

15 lines
361 B
Bash
Executable File

#!/usr/bin/env bash
# Get active workspace ID
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
# Count clients in the active workspace
clients=$(hyprctl -j clients | jq --argjson w "$active_ws" '[.[] | select(.workspace.id==$w)] | length')
# Output for Waybar
if [ "$clients" -eq 0 ]; then
echo "$active_ws"
else
echo "$active_ws ($clients)"
fi