refactor(sidebar): split tag/task list out
This commit is contained in:
		| @@ -6,6 +6,9 @@ | ||||
| (local beautiful (require :beautiful)) | ||||
| (local wibox (require :wibox)) | ||||
|  | ||||
| (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))) | ||||
| @@ -24,26 +27,8 @@ | ||||
| ;; Functions | ||||
|  | ||||
| (fn draw-sidebar [s] | ||||
|   (set s.sb-tag (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 | ||||
|                   } | ||||
|                  )) | ||||
|   (set s.sb-tasks (awful.widget.tasklist | ||||
|                    {:screen s | ||||
|                     :filter awful.widget.tasklist.filter.currenttags | ||||
|                     :style {:disable_task_name true} | ||||
|                     })) | ||||
|   (set s.sb-tag (tag-list s)) | ||||
|   (set s.sb-tasks (task-list s)) | ||||
|  | ||||
|   (set s.sb (awful.wibar {:position beautiful.sidebar_position | ||||
|                           :width beautiful.sidebar_width | ||||
| @@ -67,8 +52,8 @@ | ||||
| ;;; | ||||
| ;; Configuration | ||||
|  | ||||
| ;; (awful.screen.connect_for_each_screen | ||||
| ;;  draw-sidebar) | ||||
| (awful.screen.connect_for_each_screen | ||||
|  draw-sidebar) | ||||
|  | ||||
| {} | ||||
| ;;; module/sidebar.fnl ends here | ||||
|   | ||||
		Reference in New Issue
	
	Block a user