summaryrefslogtreecommitdiffstats
path: root/awesome
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-08-21 20:06:39 +0200
committerGravatar Tom Willemse2014-08-21 20:06:39 +0200
commit3446c32bdb65a9306ff75376b2f68648f25b7770 (patch)
tree8a723238b578566201bd8b2cb71331ff1ffe1a53 /awesome
parented09461ee73a6dd89abcdd6fe38939ad98310080 (diff)
downloaddotfiles-3446c32bdb65a9306ff75376b2f68648f25b7770.tar.gz
dotfiles-3446c32bdb65a9306ff75376b2f68648f25b7770.zip
Pick the first wallpaper that exists
Diffstat (limited to 'awesome')
-rw-r--r--awesome/.config/awesome/rc.lua12
1 files changed, 11 insertions, 1 deletions
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