Regenerated

This commit is contained in:
2026-04-03 00:11:37 +02:00
parent 9d8c16f25b
commit fb41e65af4
3 changed files with 322 additions and 346 deletions
@@ -1,17 +1,9 @@
#!/usr/bin/env bash
# ~/.config/waybar/scripts/active-workspace-wincount-json.sh
# ~/.config/waybar/scripts/hypr-workspaces.sh
# Get active workspace ID
active_ws_id=$(hyprctl activewindow | grep "workspace: " | cut -d' ' -f2)
# Example: count windows and generate tooltip
win_count=4
tooltip="• scripts - Thunar\n• Droidnix — config\n• Waybar Workspace Customization — Zen Browser\n• henrov@traveldroid: ~/.config/waybar/scripts"
# Get all clients on that workspace
clients=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id==$active_ws_id) | .title")
# Count windows
win_count=$(echo "$clients" | wc -l | tr -d ' ')
# Build tooltip string (each window on a new line)
tooltip=$(echo "$clients" | sed 's/^/• /')
# Output JSON for Waybar
jq -n --arg count "$win_count" --arg tooltip "$tooltip" '{text: $count, tooltip: $tooltip}'
# Output compact JSON
jq -c -n --arg text "$win_count" --arg tooltip "$tooltip" '{text: $text, tooltip: $tooltip}'