added new widgets

This commit is contained in:
2025-03-08 17:44:11 +01:00
parent 6bab674c4d
commit e04868b5d0
15 changed files with 261 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
(deflisten workspaces :initial "" "hyprman -w 2>>/tmp/eww_hyprman_workspaces.log")
(defvar workspaceIcons '{
"empty": "",
"full": "",
"focused": "󱓻"
}')
(defwidget hypr_workspaces []
(box
:class "workspaces"
:space-evenly false
:spacing 3
(for workspace in workspaces
(eventbox
:height 20
:width 20
:onclick "hyprctl dispatch workspace ${workspace.id}"
:cursor "pointer"
:tooltip "${workspace.name}"
:class "workspaces--ws ${workspace.active == true ? 'workspaces--ws--active' : 'workspaces--ws--inactive'}"
(label
:class "workspaces--ws--label"
:text "${workspace.windows > 0 ? workspaceIcons.full : workspaceIcons.empty}")))))