Default config: Allow beautiful.wallpaper to be a wallpaper

This e.g. allows themes to specify different wallpapers for different screens.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-04-28 17:45:36 +02:00
parent a1e340d118
commit a55baf9e3c
1 changed files with 6 additions and 1 deletions

View File

@ -168,7 +168,12 @@ mytasklist.buttons = awful.util.table.join(
awful.screen.connect_for_each_screen(function(s) awful.screen.connect_for_each_screen(function(s)
-- Wallpaper -- Wallpaper
if beautiful.wallpaper then if beautiful.wallpaper then
gears.wallpaper.maximized(beautiful.wallpaper, s, true) local wallpaper = beautiful.wallpaper
-- If wallpaper is a function, call it with the screen
if type(wallpaper) == "function" then
wallpaper = wallpaper(s)
end
gears.wallpaper.maximized(wallpaper, s, true)
end end
-- Each screen has its own tag table. -- Each screen has its own tag table.