Definde bar in newbar.yuck with variables. Changed monitors.sh from jank echo to use bar variables.

This commit is contained in:
willifan 2024-03-14 17:58:07 +01:00
parent 8d5435ee8a
commit c8ac4b08ea
7 changed files with 37 additions and 197 deletions

View file

@ -1,63 +0,0 @@
(defwindow bar0
:monitor "0"
:class "bar"
:geometry (geometry
:x "0%"
:y "5px"
:width "1400px"
:height "25px"
:anchor "top center")
:stacking "fg"
:exclusive true
(bar0))
(defwidget monitor0 []
(box
:visible false
(label
:width "15"
:text "1")
(seperator)))
(defwidget workspaces0 []
(box
:space-evenly false
:spacing 3
(for workspace in workspaces
(eventbox
:onclick `/home/willifan/.config/scripts/workspaces.sh ${workspace.ID}`
:class {workspace.activeID == "0" ? "activeWorkspace" : "smallBox"}
:valign "center"
:halign "center"
:height 20
:width 20
(box
:halign "center"
:space-evenly false
(smallSpacer)
(label
:class {workspace.occupied == true ? "" : "unoccupiedWorkspace"}
:width 16
:text "${workspace.ID}")
(imageDPI
:visible "${workspace.occupied}"
:image "${workspace.clients[0].icon}"
:size "16")
(smallSpacer))))))
(defwidget start0 []
(box
:orientation "h"
:space-evenly false
:halign "start"
(space)
(monitor0)
(time)))
(defwidget bar0 []
(centerbox :orientation "h"
(start0)
(center)
(end)))