(deflisten workspaces :initial "[]" "$home/.config/eww/scripts/get-workspaces $monitor_name") (defwidget workspaces-widget[] (box :space-evenly false :class "wk-${activeworkspaceid} workspaces-widget" :halign "start" :hexpand true :spacing 8 (for workspace in workspaces (workspace-entry :workspace_id "${workspace.id}")))) (defwidget workspace-entry[workspace_id] (button :onclick "hyprctl dispatch workspace ${workspace_id}" :class "workspace-entry ${workspace_id == activeworkspaceid ? "workspace-current" : ""}" (label :text "${workspace_id}")))