|
@ -10,6 +10,8 @@ local wibox = require("wibox") |
|
|
local awful = require("awful") |
|
|
local awful = require("awful") |
|
|
local gears = require("gears") |
|
|
local gears = require("gears") |
|
|
local beautiful = require("beautiful") |
|
|
local beautiful = require("beautiful") |
|
|
|
|
|
beautiful.widgets = beautiful.widgets or {} |
|
|
|
|
|
beautiful.templates = beautiful.templates or {} |
|
|
|
|
|
|
|
|
local awmtk = {} |
|
|
local awmtk = {} |
|
|
|
|
|
|
|
@ -41,7 +43,7 @@ awmtk.create_style = function(name,parent,overrides) |
|
|
-- A style is essentially a layer of deltas upon the previous (parent) style |
|
|
-- A style is essentially a layer of deltas upon the previous (parent) style |
|
|
local new_style = {} |
|
|
local new_style = {} |
|
|
local odelta = (overrides and overrides[name]) or {} |
|
|
local odelta = (overrides and overrides[name]) or {} |
|
|
local cdelta = (beautiful.widgets and beautiful.widgets[name]) or {} |
|
|
|
|
|
|
|
|
local cdelta = beautiful.widgets[name] or {} |
|
|
for name,parent_class in pairs(parent) do |
|
|
for name,parent_class in pairs(parent) do |
|
|
new_style[name] = awmtk.create_delta( |
|
|
new_style[name] = awmtk.create_delta( |
|
|
name, |
|
|
name, |
|
@ -410,5 +412,14 @@ awmtk.proto_templates = { |
|
|
-- This is done in order to allow overriding default style behaviour from theme |
|
|
-- This is done in order to allow overriding default style behaviour from theme |
|
|
awmtk.default = awmtk.create_style("default",awmtk.proto_style,{}) |
|
|
awmtk.default = awmtk.create_style("default",awmtk.proto_style,{}) |
|
|
awmtk.templates = awmtk.create_template_lib("templates",awmtk.proto_templates,{}) |
|
|
awmtk.templates = awmtk.create_template_lib("templates",awmtk.proto_templates,{}) |
|
|
|
|
|
|
|
|
|
|
|
-- Generic styles for widgets that need them |
|
|
|
|
|
awmtk.generic = {} |
|
|
|
|
|
awmtk.generic.menu = awmtk.create_style("generic_menu",awmtk.default,{}) |
|
|
|
|
|
awmtk.generic.button_list = awmtk.create_style("generic_button_list",awmtk.default,{}) |
|
|
|
|
|
awmtk.generic.iconified_widget = awmtk.create_style("generic_iconified_widget",awmtk.default,{}) |
|
|
|
|
|
awmtk.generic.status_widget = awmtk.create_style("generic_status_widget",awmtk.default,{}) |
|
|
|
|
|
awmtk.generic.oneline_widget = awmtk.create_style("generic_oneline_widget",awmtk.default,{}) |
|
|
|
|
|
awmtk.generic.composite_widget = awmtk.create_style("generic_composite_widget",awmtk.default,{}) |
|
|
-- }}} |
|
|
-- }}} |
|
|
return awmtk |
|
|
return awmtk |