Fix EWW workspace order

This commit is contained in:
Michael Bradley 2025-01-01 00:05:50 +13:00
parent 23fcc7668f
commit 9ad9d2c4d7

View file

@ -4,7 +4,7 @@
spaces (){
ACTIVE_ID="$(hyprctl activeworkspace -j | jq -Mc '.id')"
WORKSPACES="$(hyprctl workspaces -j | jq -Mc 'sort_by(.name)')"
WORKSPACES="$(hyprctl workspaces -j | jq -Mc 'sort_by(.id)')"
FIRSTS="$(echo "$WORKSPACES" | jq -Mc 'group_by(.monitor) | map(.[0].id)')"
echo "$WORKSPACES" | jq -Mc 'map(. as $ws | {id, name, monitor, active: (.id == '"$ACTIVE_ID"'), first: any('"$FIRSTS"' | .[] == $ws.id)})'
}