Re-set wallpaper on screen's property::geometry
Imagine that you have two screens of different resolution and you change their position (xrandr --output first --left-of second). Of course, the wallpaper has to be updated afterwards. This commit makes the default config do that. Fixes: https://github.com/awesomeWM/awesome/issues/1102 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
c7f5a9acd3
commit
750a1df1c7
|
@ -165,8 +165,7 @@ mytasklist.buttons = awful.util.table.join(
|
||||||
awful.client.focus.byidx(-1)
|
awful.client.focus.byidx(-1)
|
||||||
end))
|
end))
|
||||||
|
|
||||||
awful.screen.connect_for_each_screen(function(s)
|
local function set_wallpaper(s)
|
||||||
-- Wallpaper
|
|
||||||
if beautiful.wallpaper then
|
if beautiful.wallpaper then
|
||||||
local wallpaper = beautiful.wallpaper
|
local wallpaper = beautiful.wallpaper
|
||||||
-- If wallpaper is a function, call it with the screen
|
-- If wallpaper is a function, call it with the screen
|
||||||
|
@ -175,6 +174,14 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
end
|
end
|
||||||
gears.wallpaper.maximized(wallpaper, s, true)
|
gears.wallpaper.maximized(wallpaper, s, true)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
||||||
|
screen.connect_signal("property::geometry", set_wallpaper)
|
||||||
|
|
||||||
|
awful.screen.connect_for_each_screen(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