static bling and rubato
This commit is contained in:
parent
168920f078
commit
61a89f8dca
90 changed files with 10201 additions and 24 deletions
51
awesome/bling/widget/tabbed_misc/custom_tasklist.lua
Normal file
51
awesome/bling/widget/tabbed_misc/custom_tasklist.lua
Normal file
|
@ -0,0 +1,51 @@
|
|||
local wibox = require("wibox")
|
||||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
local dpi = require("beautiful.xresources").apply_dpi
|
||||
|
||||
local function tabobj_support(self, c, index, clients)
|
||||
-- Self is the background widget in this context
|
||||
if not c.bling_tabbed and #c.bling_tabbed.clients > 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local group = c.bling_tabbed
|
||||
|
||||
-- TODO: Allow customization here
|
||||
local layout_v = wibox.widget {
|
||||
vertical_spacing = dpi(2),
|
||||
horizontal_spacing = dpi(2),
|
||||
layout = wibox.layout.grid.horizontal,
|
||||
forced_num_rows = 2,
|
||||
forced_num_cols = 2,
|
||||
homogeneous = true
|
||||
}
|
||||
|
||||
local wrapper = wibox.widget({
|
||||
layout_v,
|
||||
id = "click_role",
|
||||
widget = wibox.container.margin,
|
||||
margins = dpi(5),
|
||||
})
|
||||
|
||||
-- To get the ball rolling.
|
||||
for idx, c in ipairs(group.clients) do
|
||||
if not (c and c.icon) then goto skip end
|
||||
|
||||
-- Add to the last layout
|
||||
layout_v:add(wibox.widget {
|
||||
{
|
||||
widget = awful.widget.clienticon,
|
||||
client = c
|
||||
},
|
||||
widget = wibox.container.constraint,
|
||||
width = dpi(24),
|
||||
height = dpi(24)
|
||||
})
|
||||
::skip::
|
||||
end
|
||||
self.widget = wrapper
|
||||
end
|
||||
|
||||
return tabobj_support
|
Loading…
Add table
Add a link
Reference in a new issue