refactor(sidebar): split tag/task list out

This commit is contained in:
2019-01-15 11:37:47 +11:00
parent 25e03a70b8
commit 5b93b8f766
3 changed files with 56 additions and 22 deletions

30
widget/tag-list.fnl Normal file
View File

@@ -0,0 +1,30 @@
;;; widget/tag-list.fnl --- Vertical tag list widget
;;; Code:
(local awful (require :awful))
(local beautiful (require :beautiful))
(local wibox (require :wibox))
;;;
;; Functions
(fn tag-list [s]
(awful.widget.taglist
{:screen s
:filter awful.widget.taglist.filter.selected
:style {:font (.. beautiful.font " Bold 10")}
;; :widget_template
;; {1
;; {:id "index_role"
;; :widget wibox.widget.textbox}
;; :widget wibox.container.margin
;; :margins 5
;; :create_callback
;; (lambda [self, c3, index, objects])}
:layout wibox.layout.fixed.vertical
}
))
tag-list
;;; widget/tag-list.fnl ends here

19
widget/task-list.fnl Normal file
View File

@@ -0,0 +1,19 @@
;;; widget/task-list.fnl --- Vertical task list
;;; Code:
(local awful (require :awful))
;;;
;; Functions
(fn task-list [s]
(awful.widget.tasklist
{:screen s
:filter awful.widget.tasklist.filter.currenttags
:style {:disable_task_name true}
}))
task-list
;;; widget/task-list.fnl ends here