setting the background image in rc.lua now. if not set the default wil be used

This commit is contained in:
Johannes Findeisen 2015-07-07 03:42:27 +02:00
commit ae45f76191
2 changed files with 19 additions and 8 deletions

View file

@ -13,6 +13,13 @@ local menubar = require("menubar")
require('naughty')
vicious = require("vicious")
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
@ -42,6 +49,17 @@ end
-- Themes define colours, icons, font and wallpapers.
beautiful.init(".config/awesome/themes/hanez/theme.lua")
-- I Don't add wallpapers to the theme because of licensing issues; you need to set
-- this yourself. I recommend to symlink your wallpaper image to
-- ~/images/background.png. I will change this at some time to become more
-- flexible. If you do not add this symlink or file, the awesome's default background
-- image will be used.
name = os.getenv("HOME").."/images/background.png"
if file_exists(name) then
beautiful.wallpaper = name
end
-- This is used later as the default terminal and editor to run.
terminal = "uxterm -bg black -fg grey -sb -leftbar -si -bc -cr orange"
editor = "/usr/bin/vim"

View file

@ -1,11 +1,6 @@
-------------------------
-- Hanez awesome theme --
-------------------------
function file_exists(name)
local f=io.open(name,"r")
if f~=nil then io.close(f) return true else return false end
end
theme = {}
theme.font = "sans 8"
@ -82,9 +77,7 @@ theme.titlebar_maximized_button_focus_inactive = "~/.config/awesome/themes/hane
theme.titlebar_maximized_button_normal_active = "~/.config/awesome/themes/hanez/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active = "~/.config/awesome/themes/hanez/titlebar/maximized_focus_active.png"
-- I Don't add wallpapers to the repo because of licensing issues; you need to set
-- this yourself.
theme.wallpaper = "~/images/background.jpg"
theme.wallpaper = "/usr/share/awesome/themes/default/background.png"
-- You can use your own layout icons like this:
theme.layout_fairh = "~/.config/awesome/themes/hanez/layouts/fairhw.png"