26 lines
926 B
Lua
26 lines
926 B
Lua
|
-- Base for widgets
|
||
|
local awmtk2 = require("awmtk2")
|
||
|
local wibox = require("wibox")
|
||
|
local gears = require("gears")
|
||
|
local awful = require("awful")
|
||
|
local beautiful = require("beautiful")
|
||
|
local menugen = require("context_menu")
|
||
|
|
||
|
return function(args)
|
||
|
local style = awmtk2.create_style("root_menu",awmtk2.default,args.style)
|
||
|
local templates = awmtk2.create_template_lib("root_menu",awmtk2.templates,args.templates)
|
||
|
local t = awmtk2.build_templates(templates,style)
|
||
|
local widget = menugen({
|
||
|
items = {
|
||
|
{"Awesome", {
|
||
|
{"open config dir", "xdg-open "..root_path},
|
||
|
{"open docs", "xdg-open https://awesomewm.org/doc/api/"},
|
||
|
{"restart", function() awesome.restart() end},
|
||
|
{"quit", function() awesome.quit() end}
|
||
|
}, beautiful.awesome_icon},
|
||
|
{"open terminal", global.terminal}
|
||
|
}
|
||
|
})
|
||
|
return widget
|
||
|
end
|