feat(sidebar): use tag number widget

This commit is contained in:
xeals 2019-01-16 00:23:31 +11:00
parent 3017ac7e16
commit 4ac05d48a6
2 changed files with 37 additions and 10 deletions

View File

@ -13,6 +13,7 @@
(local button (. (require :lib.keys) :button)) (local button (. (require :lib.keys) :button))
(local tag-list (require :widget.tag-list)) (local tag-list (require :widget.tag-list))
(local tag-number (require :widget.tag-number))
(local task-list (require :widget.task-list)) (local task-list (require :widget.task-list))
(local textclock (require :widget.textclock)) (local textclock (require :widget.textclock))
@ -79,21 +80,27 @@
(: s.sb :setup (: s.sb :setup
{:layout wibox.layout.align.vertical {:layout wibox.layout.align.vertical
1 {1 (border (tag-list s)) 1 {1 (border
{1 {1 (tag-number s)
:forced_height 32
:align :center
:widget wibox.container.place}
:bg beautiful.sidebar_bg_info
:widget wibox.container.background})
2 (border (tag-list s))
:layout wibox.layout.fixed.vertical} :layout wibox.layout.fixed.vertical}
2 {1 (border (center (task-list s)) 4) 2 {1 (border (center (task-list s)) 4)
:layout wibox.layout.flex.vertical} :layout wibox.layout.flex.vertical}
3 {1 (center systray) 3 {1 (center systray)
2 (center battery.widget) 2 (center battery.widget)
3 {1 (border 3 (border
{1 {1 (center clock) {1 {1 (center clock)
:top 2 :top 3
:bottom 2 :bottom 3
:widget wibox.container.margin} :widget wibox.container.margin}
:widget wibox.container.background
:bg beautiful.sidebar_bg_info})
:buttons clock-buttons :buttons clock-buttons
:layout wibox.layout.fixed.vertical} :bg beautiful.sidebar_bg_info
:widget wibox.container.background})
:layout wibox.layout.fixed.vertical}})) :layout wibox.layout.fixed.vertical}}))
;;; ;;;

20
widget/tag-number.fnl Normal file
View File

@ -0,0 +1,20 @@
(local awful (require :awful))
(local beautiful (require :beautiful))
(local wibox (require :wibox))
(fn tag-number [s]
(awful.widget.taglist
s
awful.widget.taglist.filter.selected
{}
{:taglist_disable_icon true
:bg_empty beautiful.bg_normal
:bg_focus beautiful.bg_focus
:bg_occupied beautiful.bg_normal
:bg_urgent beautiful.bg_normal
:font beautiful.font_mono}
awful.widget.common.list_update
;; (require :widget.list_update)
(wibox.layout.fixed.vertical)))
tag-number