19 lines
627 B
Plaintext
19 lines
627 B
Plaintext
|
|
(deflisten json_workspaces :initial '[{"id": "1"},{"id": "2"}]'
|
|
`sh ./scripts/workspaces.sh`)
|
|
|
|
(deflisten json_active_workspace :initial '{ "id": 1 }'
|
|
`sh ./scripts/active-workspace.sh`)
|
|
|
|
(defwidget workspaces []
|
|
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 || hyprctl dispatch workspace e-1"
|
|
(box :class "workspaces"
|
|
(for workspace in json_workspaces
|
|
(button :onclick "hyprctl dispatch workspace ${workspace.id}"
|
|
:class "${ json_active_workspace.id == workspace.id ? "active" : "default" }"
|
|
"${workspace.id}")
|
|
)
|
|
)
|
|
)
|
|
)
|