added new widgets
This commit is contained in:
24
.config/eww/widgets/hypr_workspaces.yuck
Normal file
24
.config/eww/widgets/hypr_workspaces.yuck
Normal 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}")))))
|
Reference in New Issue
Block a user