Files
AwesomeWM-Config/deco/wallpaper.lua
2025-12-30 13:23:54 -07:00

22 lines
450 B
Lua

local beautiful = require("beautiful")
local gears = require("gears")
local _W = {}
function _W.set_wallpaper(s)
local wallpaper = beautiful.wallpaper
if type(wallpaper) == "function" then
wallpaper = wallpaper(s)
end
gears.wallpaper.maximized(wallpaper, s, true)
end
screen.connect_signal("property::geometry", _W.set_wallpaper)
return setmetatable({}, {
__call = function(_, ...)
return _W.set_wallpaper(...)
end,
})