]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/topbar.lua
lazyvim: absorb/update neotest
[dotfiles.git] / awesome / topbar.lua
index 62ca934da3af859064bf43b91fbaeb99793770d8..f48715bd393626143de2f48fb0bebe63520e2d88 100644 (file)
@@ -23,7 +23,7 @@ end
 
 -- Wibox {{{1
 -- Create a wibox for each screen and add it
-local taglist_buttons = awful.util.table.join(
+local taglist_buttons = gears.table.join(
                     awful.button({ }, 1, function(t) t:view_only() end),
                     awful.button({ modkey }, 1, function(t)
                                               if client.focus then
@@ -40,7 +40,7 @@ local taglist_buttons = awful.util.table.join(
                     awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
                 )
 
-local tasklist_buttons = awful.util.table.join(
+local tasklist_buttons = gears.table.join(
                      awful.button({ }, 1, function (c)
                                               if c == client.focus then
                                                   c.minimized = true
@@ -73,13 +73,36 @@ awful.screen.connect_for_each_screen(function(s)
     -- Create an imagebox widget which will contains an icon indicating which layout we're using.
     -- We need one layoutbox per screen.
     s.mylayoutbox = awful.widget.layoutbox(s)
-    s.mylayoutbox:buttons(awful.util.table.join(
+    s.mylayoutbox:buttons(gears.table.join(
                            awful.button({ }, 1, function () awful.layout.inc( 1) end),
                            awful.button({ }, 3, function () awful.layout.inc(-1) end),
                            awful.button({ }, 4, function () awful.layout.inc( 1) end),
                            awful.button({ }, 5, function () awful.layout.inc(-1) end)))
     -- Create a taglist widget
-    s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
+    local theme = beautiful.get()
+    s.mytaglist = awful.widget.taglist{
+        screen  = s,
+        filter  = awful.widget.taglist.filter.all,
+        buttons = taglist_buttons,
+        style   = {
+            squares_resize = false
+        },
+        widget_template = {
+            {
+                {
+                    {
+                        id     = 'icon_role',
+                        widget = wibox.widget.imagebox,
+                    },
+                    layout = wibox.layout.fixed.horizontal,
+                },
+                forced_width = theme.wibar_height,
+                widget       = wibox.container.place,
+            },
+            id     = 'background_role',
+            widget = wibox.container.background,
+        },
+    }
 
     -- Create a tasklist widget
     s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons)
@@ -103,16 +126,7 @@ awful.screen.connect_for_each_screen(function(s)
             separator,
             require("widgets/pomodoro"),
             separator,
-            -- TODO move to mpd_widget
-            wibox.widget {
-                layout = wibox.container.scroll.horizontal,
-                max_size = 200,
-                step_function = wibox.container.scroll.step_functions.linear_increase,
-                speed = 20,
-                {
-                    widget = require("widgets/mpd_widget")
-                }
-            },
+            require("widgets/mpd_widget"),
             separator,
             require("widgets/volume_widget"),
             utils.has_battery() and {