beautiful: merge awful.beautiful, stop registering system

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-13 11:53:41 +01:00
parent 863f9a78a8
commit 2e97991a90
10 changed files with 15 additions and 50 deletions

View File

@ -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 = {}

View File

@ -1,33 +0,0 @@
---------------------------------------------------------------------------
-- @author Julien Danjou &lt;julien@danjou.info&gt;
-- @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

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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

View File

@ -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

View File

@ -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 }

View File

@ -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