Regenerated
This commit is contained in:
@@ -6,9 +6,9 @@ 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
|
||||
# Output valid JSON for Waybar
|
||||
if [ "$clients" -eq 0 ]; then
|
||||
echo "$active_ws"
|
||||
echo "{\"text\":\"$active_ws\"}"
|
||||
else
|
||||
echo "$active_ws ($clients)"
|
||||
echo "{\"text\":\"$active_ws ★ $clients\"}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user