2023-06-09 10:34:28 +00:00
|
|
|
(deflisten workspaces
|
|
|
|
:initial "[]"
|
2023-06-14 12:25:23 +00:00
|
|
|
"{{ home }}/.config/eww/scripts/get-workspaces {{ monitor_name }}")
|
2023-06-09 10:34:28 +00:00
|
|
|
|
|
|
|
(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}")))
|