rc.lua: Use the new screen requests instead of connect_for_each_screen
This will allow themes to better define their capabilities instead of having to rely on the `rc.lua` `set_wallpaper` black box function.
This commit is contained in:
parent
93c6222da4
commit
c97c17600e
|
@ -163,7 +163,7 @@ local tasklist_buttons = gears.table.join(
|
||||||
end))
|
end))
|
||||||
|
|
||||||
-- @DOC_WALLPAPER@
|
-- @DOC_WALLPAPER@
|
||||||
local function set_wallpaper(s)
|
screen.connect_signal("request::wallpaper", function(s)
|
||||||
-- Wallpaper
|
-- Wallpaper
|
||||||
if beautiful.wallpaper then
|
if beautiful.wallpaper then
|
||||||
local wallpaper = beautiful.wallpaper
|
local wallpaper = beautiful.wallpaper
|
||||||
|
@ -173,16 +173,10 @@ local function set_wallpaper(s)
|
||||||
end
|
end
|
||||||
gears.wallpaper.maximized(wallpaper, s, true)
|
gears.wallpaper.maximized(wallpaper, s, true)
|
||||||
end
|
end
|
||||||
end
|
end)
|
||||||
|
|
||||||
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
|
||||||
screen.connect_signal("property::geometry", set_wallpaper)
|
|
||||||
|
|
||||||
-- @DOC_FOR_EACH_SCREEN@
|
-- @DOC_FOR_EACH_SCREEN@
|
||||||
awful.screen.connect_for_each_screen(function(s)
|
screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
-- Wallpaper
|
|
||||||
set_wallpaper(s)
|
|
||||||
|
|
||||||
-- Each screen has its own tag table.
|
-- Each screen has its own tag table.
|
||||||
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
|
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue