aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/ui/conductor/init.lua
blob: 402945caadbc7328ad283d536e09f112786348b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
local awful = require "awful"
local gshape = require "gears.shape"
local phosphor = require "assets.phosphor"
local q = require "quarrel"
local qui = require "quarrel.ui"
local qvars = require "quarrel.vars"
local wibox = require "wibox"

local M = {}

M._popup = qui.popup {
    -- visible = false,
    ontop = true,
    placement = "right",
    shape = function(cr, w, h)
        gshape.partially_rounded_rect(cr, w, h, true, false, false, true, qui.BORDER_RADIUS)
    end,
    -- x = awful.screen.focused().geometry.width,
    -- minimum_width = width,
    -- maximum_width = width,
    -- maximum_height = max_height,
    widget = awful.widget.tasklist {
        screen = awful.screen.focused(),
        filter = awful.widget.tasklist.filter.allscreen,
        layout = {
            spacing = qui.BIG_PADDING,
            layout = wibox.layout.fixed.vertical,
        },
        widget_template = qui.styled {
            widget = wibox.container.background,
            {
                {
                    widget = wibox.container.constraint,
                    strategy = "max",
                    height = qui.CHAR_HEIGHT,
                    width = qui.CHAR_HEIGHT,
                    {
                        widget = wibox.widget.imagebox,
                        id = "icon_role",
                    },
                },
                {
                    widget = wibox.container.constraint,
                    strategy = "max",
                    width = qui.CHAR_WIDTH * 24,
                    {
                        widget = wibox.widget.textbox,
                        id = "client_name",
                    },
                },
                layout = wibox.layout.fixed.horizontal,
                spacing = qui.PADDING,
            },
            create_callback = function(self, c)
                self:get_children_by_id("client_name")[1].text = c.icon_name
            end,
            update_callback = function(self, c)
                self:get_children_by_id("client_name")[1].text = c.name
            end,
        },
    },
}

return M