(deflisten workspaces :initial "[]" "modules/workspace/workspaces.sh" ) (deflisten current_workspace :initial "1" "modules/workspace/get-active-workspace.sh" ) (defwidget workspaces [] (eventbox :onscroll "modules/workspace/scroll-current-workspace.sh {} ${current_workspace}" (box :orientation "h" :space-evenly false :class "workspaces" :hexpand true (for workspace in workspaces (button :class "workspace ${current_workspace == workspace.id ? "active" : ""}" :onclick "hyprctl dispatch workspace ${workspace.id}" "${workspace.id}" ) ) ) ) )