feat: add tint2ish tag list and clock to sidebar

This commit is contained in:
2019-01-15 15:14:29 +11:00
parent 54230c55dd
commit 7b21018a59
19 changed files with 355 additions and 65 deletions

View File

@@ -8,46 +8,49 @@
(local tag-list (require :widget.tag-list))
(local task-list (require :widget.task-list))
(local sb-clock (wibox.widget.textclock "%H\n%M"))
(local sb-systray (doto (wibox.widget.systray)
(: :set_base_size 24)))
(local fill-width (doto (wibox.layout.fixed.horizontal)
(: :fill_space true)
(: :set_spacing 10)))
(local bounding (wibox.container.margin
(wibox.container.place
(wibox.container.margin
nil
10 10 10 10 beautiful.sidebar_subbox))
1 1 1 1 beautiful.sidebar_bg))
(local textclock (require :widget.textclock))
;;;
;; Functions
(fn draw-sidebar [s]
(set s.sb-tag (tag-list s))
(set s.sb-tasks (task-list s))
(fn border [t margin]
(let [side (or margin 2)
end (+ side 1)]
{1 t
:bottom end
:left side
:right side
:top end
:widget wibox.container.margin} ))
(local sb-clock (textclock "%H\n%M"))
(local sb-systray (doto (wibox.widget.systray)
(: :set_base_size 24)))
(fn draw-sidebar [s]
(set s.sb (awful.wibar {:position beautiful.sidebar_position
:width beautiful.sidebar_width
:screen s}))
(: s.sb :setup
{:layout wibox.layout.align.vertical
1 {:layout wibox.layout.fixed.vertical
1 {1 s.sb-tag
:halign "center"
:layout (wibox.container.margin nil 10 10 10 10)}
2 s.sb-tasks}
1 {1 (border (tag-list s))
;; 2 (task-list s)
:layout wibox.layout.fixed.vertical}
2 {:layout wibox.layout.fixed.vertical}
3 {:layout wibox.layout.fixed.vertical
1 sb-systray
2 {1 sb-clock
:valign "center"
:halign "center"
:layout bounding}}}))
3 {1 sb-systray
2 {1 (border
{1 {1 {1 sb-clock
:valign "center"
:halign "center"
:widget wibox.container.place}
:top 2
:bottom 2
:widget wibox.container.margin}
:widget wibox.container.background
:bg beautiful.sidebar_bg_info})
:layout wibox.layout.fixed.vertical}
:layout wibox.layout.fixed.vertical}}))
;;;
;; Configuration