From 3446c32bdb65a9306ff75376b2f68648f25b7770 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 21 Aug 2014 20:06:39 +0200 Subject: [PATCH] Pick the first wallpaper that exists --- awesome/.config/awesome/rc.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 60eff7b..a89cc16 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -11,6 +11,7 @@ local beautiful = require("beautiful") local naughty = require("naughty") local menubar = require("menubar") local lfs = require("lfs") +local posix = require("posix") package.path = '/home/slash/projects/avandu-lua/lua/?.lua;' .. package.path @@ -100,7 +101,16 @@ local layouts = -- {{{ Wallpaper -- 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