diff --git a/themes/xresources/assets.lua b/themes/xresources/assets.lua index 988030786..e7a7db722 100644 --- a/themes/xresources/assets.lua +++ b/themes/xresources/assets.lua @@ -47,9 +47,10 @@ function theme_assets.taglist_squares_unsel(size, fg) end -function theme_assets.wallpaper(bg, fg, alt_fg) - local height = screen[1].workarea.height - local width = screen[1].workarea.width +function theme_assets.wallpaper(bg, fg, alt_fg, s) + s = s or screen.primary + local height = s.workarea.height + local width = s.workarea.width local img = cairo.ImageSurface(cairo.Format.ARGB32, width, height) local cr = cairo.Context(img) diff --git a/themes/xresources/theme.lua b/themes/xresources/theme.lua index 507914798..a1cea1a23 100644 --- a/themes/xresources/theme.lua +++ b/themes/xresources/theme.lua @@ -91,9 +91,9 @@ local wallpaper_alt_fg = xrdb.color12 if not is_dark_bg then wallpaper_bg, wallpaper_fg = wallpaper_fg, wallpaper_bg end -theme.wallpaper = theme_assets.wallpaper( - wallpaper_bg, wallpaper_fg, wallpaper_alt_fg -) +theme.wallpaper = function(s) + return theme_assets.wallpaper(wallpaper_bg, wallpaper_fg, wallpaper_alt_fg, s) +end return theme