local awful = require("awful") local wibox = require("wibox") local wibox_tooltip = require("lib.wiboxtooltip") local beautiful = require("beautiful") local separator = { widget = wibox.widget.separator, opacity = 0 } function tooltip_tag_clients() local text = "" for _, c in ipairs(awful.screen.focused():get_clients(false)) do local ctext = c.name if c == client.focus then ctext = "* " .. ctext end text = text .. ctext .. "\n" end return text:sub(1, -2) -- remove last newline end function create_tasklist(s) local tasklist = awful.widget.tasklist { screen = s, filter = awful.widget.tasklist.filter.focused, buttons = tasklist_buttons, widget_template = { id = "text_role", widget = wibox.widget.textbox, align = "center", }, } local popup = wibox_tooltip(tasklist, awful.widget.tasklist { screen = s, filter = awful.widget.tasklist.filter.currenttags, layout = { layout = wibox.layout.fixed.vertical, }, widget_template = { id = "text_role", widget = wibox.widget.textbox, align = "center", }, style = { font_focus = beautiful.font_mono_bold, }, }) return wibox.widget { layout = wibox.layout.align.horizontal, expand = "outside", separator, tasklist, separator, } end ---- signal for changing tasklist filter based on layout ---- DOESNT WORK TODO --local naughty = require("naughty") --s:connect_signal("property::layout", function() -- naughty.notify({ -- title = "Hello, AwesomeWM!", -- text = "This is a notification.", -- timeout = 5, -- Timeout in seconds -- position = "top_right" -- Position on the screen -- }) -- if awful.layout.get(s) == awful.layout.suit.max then -- s.mytasklist.filter = awful.widget.tasklist.filter.currenttags -- else -- s.mytasklist.filter = awful.widget.tasklist.filter.focused -- end --end --) return create_tasklist