Files
dotfiles/eww/widgets/hypr_workspaces.yuck
2025-03-06 23:28:59 +01:00

21 lines
548 B
Plaintext

(deflisten workspaces :initial "" "hyprman -w")
(defvar workspaceIcons '{
"empty": "",
"full": "",
"focused": "󱓻"
}')
(defwidget hypr_workspaces []
(box
:class "workspacecontainer"
:space-evenly true
(for workspace in workspaces
(eventbox
:onclick "hyprctl dispatch workspace ${workspace.id}"
:tooltip "${workspace.name}"
:class "workspace ${workspace.active == true ? 'wsactive' : 'wsinactive'}"
"${workspace.windows > 0 ? workspaceIcons.full : workspaceIcons.empty}"))))