24 lines
551 B
Lua
24 lines
551 B
Lua
|
local screen_slots = {}
|
||
|
|
||
|
function screen_slots.wallpaper (screen, params)
|
||
|
local beautiful = require 'beautiful'
|
||
|
local gwallpaper = require 'gears.wallpaper'
|
||
|
|
||
|
params = params or {
|
||
|
wallpaper = beautiful.wallpaper
|
||
|
}
|
||
|
|
||
|
local wallpaper = params.wallpaper
|
||
|
|
||
|
if wallpaper then
|
||
|
-- If wallpaper is a function, call it with the screen
|
||
|
if type(wallpaper) == 'function' then
|
||
|
wallpaper = wallpaper(screen)
|
||
|
end
|
||
|
|
||
|
gwallpaper.maximized(wallpaper, screen, true)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return screen_slots
|