56 lines
841 B
Plaintext
56 lines
841 B
Plaintext
|
(defwindow bar
|
||
|
:monitor 0
|
||
|
:exclusive true
|
||
|
:class "bar"
|
||
|
:windowtype "dock"
|
||
|
:geometry (geometry :x "0%"
|
||
|
:y "0%"
|
||
|
:width "100%"
|
||
|
:height "20px"
|
||
|
:anchor "top center")
|
||
|
(bar))
|
||
|
|
||
|
;
|
||
|
; variables
|
||
|
;
|
||
|
|
||
|
(defvar tags "[1,2,3,4,5]")
|
||
|
(defvar tagSymbols `["一","二","三","四","五"]`)
|
||
|
|
||
|
|
||
|
(defwidget bar []
|
||
|
(centerbox
|
||
|
:orientation "h"
|
||
|
(left)
|
||
|
"This is *the* bar"
|
||
|
":D"))
|
||
|
|
||
|
;
|
||
|
;
|
||
|
; LEFT
|
||
|
;
|
||
|
;
|
||
|
(defwidget left []
|
||
|
(box
|
||
|
:class "left-side"
|
||
|
:orientation "h"
|
||
|
:space-evenly false
|
||
|
:halign "start"
|
||
|
:spacing 3
|
||
|
(tags)))
|
||
|
|
||
|
;
|
||
|
; Widget that just prints all tags :D
|
||
|
;
|
||
|
(defwidget tags []
|
||
|
(box
|
||
|
:spacing 4
|
||
|
(for idx in tags
|
||
|
(tag :id idx
|
||
|
:symbol `${tagSymbols[idx - 1]}`))))
|
||
|
|
||
|
(defwidget tag [id symbol]
|
||
|
(box :class "single-tag"
|
||
|
{symbol}))
|
||
|
|