Pick the first wallpaper that exists

This commit is contained in:
Tom Willemse 2014-08-21 20:06:39 +02:00
parent ed09461ee7
commit 3446c32bdb

View file

@ -11,6 +11,7 @@ local beautiful = require("beautiful")
local naughty = require("naughty") local naughty = require("naughty")
local menubar = require("menubar") local menubar = require("menubar")
local lfs = require("lfs") local lfs = require("lfs")
local posix = require("posix")
package.path = package.path =
'/home/slash/projects/avandu-lua/lua/?.lua;' .. package.path '/home/slash/projects/avandu-lua/lua/?.lua;' .. package.path
@ -100,7 +101,16 @@ local layouts =
-- {{{ Wallpaper -- {{{ Wallpaper
-- gears.wallpaper.tiled("/home/slash/pictures/wallpaper-962650.jpg") -- gears.wallpaper.tiled("/home/slash/pictures/wallpaper-962650.jpg")
gears.wallpaper.tiled("/home/slash/pictures/wallpaper-2311191.jpg") local wallpapers = { "/home/slash/pictures/wallpaper-2311191.jpg",
"/home/slash/pictures/wallpaper-1518737-phoenix.png" }
for idx, wall in ipairs(wallpapers) do
if posix.access(wall) then
gears.wallpaper.tiled(wall)
break
end
end
-- }}} -- }}}
-- {{{ Tags -- {{{ Tags