beautiful: merge awful.beautiful, stop registering system
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
863f9a78a8
commit
2e97991a90
|
@ -9,6 +9,9 @@ theme_path = "@AWESOME_THEMES_PATH@/default/theme"
|
|||
-- Uncommment this for a lighter theme
|
||||
-- theme_path = "@AWESOME_THEMES_PATH@/sky/theme"
|
||||
|
||||
-- Actually load theme
|
||||
beautiful.init(theme_path)
|
||||
|
||||
-- This is used later as the default terminal and editor to run.
|
||||
terminal = "xterm"
|
||||
editor = os.getenv("EDITOR") or "nano"
|
||||
|
@ -64,16 +67,6 @@ apptags =
|
|||
use_titlebar = false
|
||||
-- }}}
|
||||
|
||||
-- {{{ Initialization
|
||||
-- Initialize theme (colors).
|
||||
beautiful.init(theme_path)
|
||||
|
||||
-- Register theme in awful.
|
||||
-- This allows to not pass plenty of arguments to each function
|
||||
-- to inform it about colors we want it to draw.
|
||||
awful.beautiful.register(beautiful)
|
||||
-- }}}
|
||||
|
||||
-- {{{ Tags
|
||||
-- Define tags table.
|
||||
tags = {}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
---------------------------------------------------------------------------
|
||||
-- @author Julien Danjou <julien@danjou.info>
|
||||
-- @copyright 2008 Julien Danjou
|
||||
-- @release @AWESOME_VERSION@
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local package = package
|
||||
|
||||
--- Beautiful module for awful
|
||||
module("awful.beautiful")
|
||||
|
||||
-- Exported variable handling theme.
|
||||
theme = {}
|
||||
|
||||
--- Register the beautiful theme if beautiful is used.
|
||||
-- That allows various awful functions (and maybe other module using the
|
||||
-- awful.beautiful.get() method) to use colors theme as defined in beautiful.
|
||||
-- @param The beautiful theme.
|
||||
function register(btheme)
|
||||
if btheme then
|
||||
theme = btheme
|
||||
else
|
||||
theme = {}
|
||||
end
|
||||
end
|
||||
|
||||
--- Get the current registered theme.
|
||||
-- @return The current theme table.
|
||||
function get()
|
||||
return package.loaded.awful.beautiful.theme
|
||||
end
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
|
@ -4,7 +4,6 @@
|
|||
-- @release @AWESOME_VERSION@
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
local beautiful = require("awful.beautiful")
|
||||
local client = require("awful.client")
|
||||
local completion = require("awful.completion")
|
||||
local hooks = require("awful.hooks")
|
||||
|
|
|
@ -16,7 +16,7 @@ local button = button
|
|||
local capi = { screen = screen, mouse = mouse, client = client }
|
||||
local util = require("awful.util")
|
||||
local tags = require("awful.tag")
|
||||
local awbeautiful = require("awful.beautiful")
|
||||
local awbeautiful = require("beautiful")
|
||||
|
||||
--- Menu module for awful
|
||||
module("awful.menu")
|
||||
|
|
|
@ -14,7 +14,7 @@ local capi =
|
|||
keygrabber = keygrabber
|
||||
}
|
||||
local util = require("awful.util")
|
||||
local beautiful = require("awful.beautiful")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
--- Prompt module for awful
|
||||
module("awful.prompt")
|
||||
|
|
|
@ -15,7 +15,7 @@ local capi =
|
|||
button = button,
|
||||
client = client,
|
||||
}
|
||||
local beautiful = require("awful.beautiful")
|
||||
local beautiful = require("beautiful")
|
||||
local hooks = require("awful.hooks")
|
||||
local util = require("awful.util")
|
||||
local widget = require("awful.widget")
|
||||
|
|
|
@ -18,7 +18,7 @@ local capi =
|
|||
}
|
||||
local util = require("awful.util")
|
||||
local hooks = require("awful.hooks")
|
||||
local beautiful = require("awful.beautiful")
|
||||
local beautiful = require("beautiful")
|
||||
local menu = require("awful.menu")
|
||||
|
||||
--- Widget module for awful
|
||||
|
|
|
@ -87,6 +87,12 @@ function init(path)
|
|||
end
|
||||
end
|
||||
|
||||
--- Get the current theme.
|
||||
-- @return The current theme table.
|
||||
function get()
|
||||
return package.loaded[module_name]
|
||||
end
|
||||
|
||||
setmetatable(package.loaded[module_name], package.loaded[module_name])
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
local wibox = wibox
|
||||
local widget = widget
|
||||
local awful = require("awful")
|
||||
local beautiful = require("awful.beautiful")
|
||||
local beautiful = require("beautiful")
|
||||
local image = image
|
||||
local capi = { screen = screen, mouse = mouse, keygrabber = keygrabber }
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ local string = string
|
|||
local widget = widget
|
||||
local button = button
|
||||
local capi = { screen = screen }
|
||||
local bt = require("awful.beautiful")
|
||||
local bt = require("beautiful")
|
||||
local beautiful = bt.get()
|
||||
|
||||
--- Notification library
|
||||
|
|
Loading…
Reference in New Issue