desktop-utils/newbar.yuck

60 lines
1.5 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))
(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)))