dotfiles/.config/eww/templates/bar/modules/workspaces.yuck

19 lines
744 B
Plaintext
Raw Normal View History

2023-06-09 10:34:28 +00:00
(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}")))