nixos-config/ahrc-laptop/eww/eww.yuck

65 lines
1,007 B
Text
Raw Normal View History

2024-11-04 15:49:10 +01:00
(deflisten workspaces
:initial "[]"
"./listen/niri/workspaces"
)
(defvar workspace-icon '{
"admin": "",
"everything": "",
"apps": ""
}')
(defwidget workspaces []
(box
:class "workspaces"
(for workspace in {workspaces}
(eventbox
:onclick "niri msg action focus-workspace ${workspace.idx}"
:width 25
:class "workspace-button${workspace.is_active ? " workspace-active" : ""}"
"${"${workspace-icon?.[workspace.name]}" ?: ""} "
)
)
)
)
(defwidget time []
"${formattime(EWW_TIME, "%Y-%m-%d")} ${formattime(EWW_TIME, "%H:%M:%S")}"
)
(defwindow dock
2024-10-23 20:14:52 +02:00
:monitor 0
:geometry (geometry
2024-11-04 15:49:10 +01:00
:x "0"
:y "0"
:width "100%"
2024-10-23 20:14:52 +02:00
:height "30px"
2024-11-04 15:49:10 +01:00
:anchor "bottom center"
2024-10-23 20:14:52 +02:00
)
:stacking "fg"
2024-11-04 15:49:10 +01:00
:exclusive true
(centerbox
(box
:class "left"
:halign "start"
:space-evenly false
(workspaces)
)
(box
:class "middle"
(time)
)
(box
:class "right"
)
)
2024-10-23 20:14:52 +02:00
)