yadm-config/.config/eww/widgets/bar/scripts/workspaces.jq
2025-11-11 17:44:06 +01:00

17 lines
560 B
Text

$workspaces | map({
id: .id,
name: .name,
activeOnCurrentScreen: .id == $activeWorkspace.id,
activeOnAnyScreen: (.id as $workspaceId | any($monitors[]; .activeWorkspace.id == $workspaceId)),
windows: (
.id as $workspaceId | $clients | map ( select(.workspace.id == $workspaceId) | {
class: .class,
title: .title,
pid: .pid,
icon: (
.class as $class |
($clientIcons | keys | .[] | select(. as $regex | $class | test($regex)) | $clientIcons[.]) // " "
)
})
)
}) | sort_by(.id)