desktop-utils/newbar.yuck
2024-03-17 15:44:15 +01:00

62 lines
1.7 KiB
Text

;;1400 x 25 laptopWindow
;;(defvar windows '[{"monitor":"0","width":"1400","height":"25"}]')
(defwindow bar [monitor width height]
:monitor "${monitor}"
:class "bar"
:geometry (geometry
:x "0%"
:y "5px"
:width "${width}px"
:height "${height}px"
:anchor "top center")
:stacking "fg"
:exclusive true
(bar
:monitor "${monitor}"))
(defwidget workspaces [monitor]
(box
:space-evenly false
:spacing 3
(for workspace in workspaces
(eventbox
:onclick `/home/willifan/.config/scripts/workspaces.sh ${workspace.normal.ID}`
:class {workspace.normal.monitorID == "${monitor}" ? "activeWorkspace" : "smallBox"}
:valign "center"
:halign "center"
:height 20
:width 20
(box
:halign "center"
:space-evenly false
(smallSpacer)
(label
:class {workspace.normal.occupied == true ? "" : "unoccupiedWorkspace"}
:width 16
:text "${workspace.normal.ID}")
(imageDPI
:visible "${workspace.normal.occupied > 0 ? true : false}"
:image "${workspace.normal.icon}"
:size "16")
(smallSpacer))))))
(defwidget start []
(box
:orientation "h"
:space-evenly false
:halign "start"
(space)
(time)))
(defwidget bar [monitor]
(centerbox :orientation "h"
(start)
(center
:monitor "${monitor}")
(end)))