beautiful: set wallpaper of each screen

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-08-20 18:15:08 +02:00
parent 62370ecb87
commit fd35fc6d11
2 changed files with 11 additions and 4 deletions

View File

@ -824,10 +824,11 @@ end
--- Spawn a program.
-- @param cmd The command.
-- @param screen The screen where to spawn window.
-- @return The awesome.spawn return value.
function spawn(cmd)
function spawn(cmd, screen)
if cmd and cmd ~= "" then
return capi.awesome.spawn(cmd .. "&", capi.mouse.screen)
return capi.awesome.spawn(cmd .. "&", screen or capi.mouse.screen)
end
end

View File

@ -11,7 +11,11 @@ local print = print
local setmetatable = setmetatable
local awful = require("awful")
local package = package
local capi = { awesome = awesome }
local capi =
{
screen = screen,
awesome = awesome
}
local module_name = "beautiful"
@ -64,7 +68,9 @@ function init(path)
key, value = split_line(line)
if key then
if key == "wallpaper_cmd" then
awful.spawn(value)
for s = 1, capi.screen.count() do
awful.spawn(value, s)
end
elseif key == "font" then
capi.awesome.font_set(value)
elseif key == "fg_normal" then