From d751141e745ea41c52ef7c2450d3729125e592ab Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 29 Jul 2012 16:47:04 +0200 Subject: [PATCH] Re-add wallpapers to the themes The commit "Remove all traces of awsetbg and wallpaper setters" removed these. This commit adds them back, but they are now applied a little different. The main reason is that this makes it really easy for the user to ignore the wallpaper that a theme specifies. Signed-off-by: Uli Schlachter --- awesomerc.lua.in | 9 +++++++++ themes/default/theme.lua.in | 2 ++ themes/sky/theme.lua.in | 1 + themes/zenburn/theme.lua.in | 1 + 4 files changed, 13 insertions(+) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 261fa50b..e9047671 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -1,4 +1,5 @@ -- Standard awesome library +local gears = require("gears") local awful = require("awful") awful.rules = require("awful.rules") require("awful.autofocus") @@ -69,6 +70,14 @@ local layouts = } -- }}} +-- {{{ Wallpaper +if beautiful.wallpaper then + for s = 1, screen.count() do + gears.wallpaper.maximized(beautiful.wallpaper, s, true) + end +end +-- }}} + -- {{{ Tags -- Define a tag table which hold all screen tags. tags = {} diff --git a/themes/default/theme.lua.in b/themes/default/theme.lua.in index 8ba91b9b..1aec2982 100644 --- a/themes/default/theme.lua.in +++ b/themes/default/theme.lua.in @@ -72,6 +72,8 @@ theme.titlebar_maximized_button_focus_inactive = "@AWESOME_THEMES_PATH@/default theme.titlebar_maximized_button_normal_active = "@AWESOME_THEMES_PATH@/default/titlebar/maximized_normal_active.png" theme.titlebar_maximized_button_focus_active = "@AWESOME_THEMES_PATH@/default/titlebar/maximized_focus_active.png" +theme.wallpaper = "@AWESOME_THEMES_PATH@/default/background.png" + -- You can use your own layout icons like this: theme.layout_fairh = "@AWESOME_THEMES_PATH@/default/layouts/fairhw.png" theme.layout_fairv = "@AWESOME_THEMES_PATH@/default/layouts/fairvw.png" diff --git a/themes/sky/theme.lua.in b/themes/sky/theme.lua.in index 9b37aa39..4fd2cb45 100644 --- a/themes/sky/theme.lua.in +++ b/themes/sky/theme.lua.in @@ -46,6 +46,7 @@ theme.taglist_squares_sel = "@AWESOME_THEMES_PATH@/default/taglist/squarefw.pn theme.taglist_squares_unsel = "@AWESOME_THEMES_PATH@/default/taglist/squarew.png" -- MISC +theme.wallpaper = "@AWESOME_THEMES_PATH@/sky/sky-background.png" theme.taglist_squares = "true" theme.titlebar_close_button = "true" theme.menu_height = 15 diff --git a/themes/zenburn/theme.lua.in b/themes/zenburn/theme.lua.in index def52f22..51bd14a4 100644 --- a/themes/zenburn/theme.lua.in +++ b/themes/zenburn/theme.lua.in @@ -8,6 +8,7 @@ -- {{{ Main theme = {} +theme.wallpaper = "@AWESOME_THEMES_PATH@/zenburn/zenburn-background.png" -- }}} -- {{{ Styles