Yessiest
2 years ago
7 changed files with 58 additions and 39 deletions
-
32core/layout.lua
-
2core/vars.lua
-
11libs/awmtk.lua
-
8themes/unity/theme.lua
-
38widgets/drawer.lua
-
2widgets/mailbox.lua
-
4widgets/wintitle.lua
@ -0,0 +1,38 @@ |
|||
local awful = require("awful") |
|||
local wibox = require("wibox") |
|||
local awmtk = require("awmtk") |
|||
|
|||
return function(args) |
|||
local style = awmtk.style(awmtk.defaults, args.style or {},"drawer_") |
|||
local contained_widget = { |
|||
id = "contents", |
|||
widget = wibox.container.background, |
|||
layout = (args.vertical and wibox.layout.fixed.vertical) or |
|||
wibox.layout.fixed.horizontal, |
|||
visible = false |
|||
} |
|||
for k,v in ipairs(args) do |
|||
table.insert(contained_widget,v) |
|||
end |
|||
local widget = style.icon { |
|||
contained_widget, |
|||
{ |
|||
widget = wibox.widget.imagebox, |
|||
image = style["battery_missing_symbolic"], |
|||
id = "widget_toggle", |
|||
resize = true |
|||
}, |
|||
layout = (args.vertical and wibox.layout.fixed.vertical) or |
|||
wibox.layout.fixed.horizontal, |
|||
spacing = style.drawer_container_spacing_horizontal |
|||
} |
|||
widget:get_children_by_id("widget_toggle")[1]:buttons( |
|||
awful.util.table.join( |
|||
awful.button({},1,function() |
|||
local subwidget = widget:get_children_by_id("contents")[1] |
|||
subwidget.visible = not subwidget.visible |
|||
end) |
|||
) |
|||
) |
|||
return widget |
|||
end |
Write
Preview
Loading…
Cancel
Save
Reference in new issue