desktop-utils/newbar.yuck
2024-03-13 19:01:27 +01:00

55 lines
1.4 KiB
Text

(defwindow bar
:monitor "0"
:class "bar"
:geometry (geometry
:x "0%"
:y "5px"
:width "1400px"
:height "25px"
:anchor "top center")
:stacking "fg"
:exclusive true
(bar))
(defwidget workspaces []
(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 start []
(box
:orientation "h"
:space-evenly false
:halign "start"
(space)
(time)))
(defwidget bar []
(centerbox :orientation "h"
(start)
(center)
(end)))