From 87e209f23714781f88609d37d232f34dd6a159d5 Mon Sep 17 00:00:00 2001 From: Mutzi Date: Tue, 24 Jan 2023 00:52:50 +0100 Subject: [PATCH] Added tasklisk, made network info less jumpy --- awesome/theme.lua | 65 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/awesome/theme.lua b/awesome/theme.lua index 5ee395a..3e4a762 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -91,6 +91,15 @@ theme.titlebar_maximized_button_focus_inactive = theme.confdir .. '/icons/titleb theme.titlebar_maximized_button_normal_active = theme.confdir .. '/icons/titlebar/maximized_normal_active.png' theme.titlebar_maximized_button_focus_active = theme.confdir .. '/icons/titlebar/maximized_focus_active.png' +theme.tasklist_fg_normal = '#555555' +theme.tasklist_bg_normal = '#5bcdc2' +theme.tasklist_fg_focus = '#111111' +theme.tasklist_bg_focus = '#5bcdab' +theme.tasklist_fg_urgent = '#c1cd5b' +theme.tasklist_bg_urgent = '#cd5b66' +theme.tasklist_fg_minimize = '#99aaff' +theme.tasklist_bg_minimize = '#5c7875' + local markup = lain.util.markup -- Textclock @@ -282,7 +291,37 @@ function theme.at_screen_connect(s) s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) -- Create a tasklist widget - s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + s.mytasklist = awful.widget.tasklist({ + screen = s, + filter = awful.widget.tasklist.filter.currenttags, + buttons = awful.util.tasklist_buttons, + style = { + shape_focus = function(cr, w, h) + gears.shape.partially_rounded_rect(cr, w, h, false, true, false, true, 10) + end, + shape = function(cr, w, h) + gears.shape.partially_rounded_rect(cr, w, h, true, false, true, false, 10) + end, + }, + layout = { + spacing = 5, + layout = wibox.layout.flex.horizontal, + }, + widget_template = { + { + { + id = 'text_role', + widget = wibox.widget.textbox, + }, + left = 10, + right = 10, + widget = wibox.container.margin, + }, + id = 'background_role', + widget = wibox.container.background, + }, + }) + s.mytasklist = wibox.container.margin(s.mytasklist, 20, 20, 1, 1) -- Create the wibox s.mywibox = @@ -299,17 +338,29 @@ function theme.at_screen_connect(s) --mpdicon, --theme.mpd.widget, }, - --s.mytasklist, -- Middle widget - nil, + s.mytasklist, -- Middle widget + --nil, { -- Right widgets layout = wibox.layout.fixed.horizontal, wibox.widget.systray(), --mailicon, --theme.mail.widget, - netdownicon, - netdowninfo, - netupicon, - netupinfo.widget, + { + { + { + layout = wibox.layout.fixed.horizontal, + netdownicon, + netdowninfo, + netupicon, + netupinfo.widget, + }, + halign = 'right', + widget = wibox.container.place, + }, + width = 120, + strategy = 'exact', + layout = wibox.layout.constraint, + }, volicon, theme.volume.widget, memicon,