refactor bottomBar smol bit

This commit is contained in:
Schrottkatze 2024-09-10 22:07:27 +02:00
parent bd3674accf
commit 54a1e34fa6
No known key found for this signature in database
2 changed files with 19 additions and 18 deletions

View file

@ -1,3 +1,5 @@
(include "bottomBar/workspaces.yuck")
(defwindow bottomBar (defwindow bottomBar
:monitor 0 :monitor 0
:stacking "fg" :stacking "fg"
@ -39,21 +41,3 @@
) )
) )
) )
(defwidget workspaceWidget []
(box
:class "workspaces"
(for workspace in workspaces
(button
:class "${workspace.urgent ? "urgent" : ""} ${workspace.focused ? "focused" : 0}"
:onclick "swaymsg workspace ${workspace.name}"
(label :text "${workspace.name}")
)
)
)
)
(deflisten workspaces
:initial "[]"
"bar-ws-monitor"
)

View file

@ -0,0 +1,17 @@
(defwidget workspaceWidget []
(box
:class "workspaces"
(for workspace in workspaces
(button
:class "${workspace.urgent ? "urgent" : ""} ${workspace.focused ? "focused" : 0}"
:onclick "swaymsg workspace ${workspace.name}"
(label :text "${workspace.name}")
)
)
)
)
(deflisten workspaces
:initial "[]"
"bar-ws-monitor"
)