awesomewm/autobeautiful.lua

27 lines
702 B
Lua
Raw Normal View History

2013-04-13 15:17:09 +00:00
local beautiful = require("beautiful")
local gears = require("gears")
2014-08-28 08:58:03 +00:00
local awful = require("awful")
2013-04-13 15:17:09 +00:00
beautiful.init(awful.util.getdir("config") .. "/theme.lua")
2017-02-16 08:51:01 +00:00
local wallpaperrc = awful.util.getdir("config") .. "/wallpaperrc.lua"
2016-04-07 09:18:14 +00:00
local f=io.open(wallpaperrc,"r")
if f~=nil then
io.close(f)
require("wallpaperrc")
2017-02-16 08:51:01 +00:00
for s in screen do
set_wallpaper(s)
end
screen.connect_signal("property::geometry", set_wallpaper)
2017-02-16 08:51:01 +00:00
elseif beautiful.wallpaper then
f = io.open(beautiful.wallpaper)
if f ~= nil then
io.close(f)
screen.connect_signal("property::geometry", function(s)
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
end)
end
2013-04-13 15:17:09 +00:00
end
return beautiful