From fd35fc6d11472330d004b38abfa764ddad69f49c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 20 Aug 2008 18:15:08 +0200 Subject: [PATCH] beautiful: set wallpaper of each screen Signed-off-by: Julien Danjou --- lib/awful.lua.in | 5 +++-- lib/beautiful.lua.in | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/awful.lua.in b/lib/awful.lua.in index bbfcc82c..df2435cf 100644 --- a/lib/awful.lua.in +++ b/lib/awful.lua.in @@ -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 diff --git a/lib/beautiful.lua.in b/lib/beautiful.lua.in index 3c5a9ca3..cc85c398 100644 --- a/lib/beautiful.lua.in +++ b/lib/beautiful.lua.in @@ -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