diff --git a/awesomerc.lua b/awesomerc.lua index 305c8a06c..4dcbbc07e 100755 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -39,7 +39,7 @@ end -- {{{ Variable definitions -- Themes define colours, icons, font and wallpapers. -beautiful.init("@AWESOME_THEMES_PATH@/default/theme.lua") +beautiful.init(awful.util.get_themes_dir() .. "default/theme.lua") -- This is used later as the default terminal and editor to run. terminal = "xterm" diff --git a/lib/awful/util.lua b/lib/awful/util.lua index f114e5482..32e6fa28e 100644 --- a/lib/awful/util.lua +++ b/lib/awful/util.lua @@ -158,6 +158,18 @@ function util.get_cache_dir() return util.get_xdg_cache_home() .. "awesome/" end +--- Get the path to the directory where themes are installed. +-- @return A string with the requested path with a slash at the end. +function util.get_themes_dir() + return "@AWESOME_THEMES_PATH@" .. "/" +end + +--- Get the path to the directory where our icons are installed. +-- @return A string with the requested path with a slash at the end. +function util.get_awesome_icon_dir() + return "@AWESOME_ICON_PATH@" .. "/" +end + --- Get the user's config or cache dir. -- It first checks XDG_CONFIG_HOME / XDG_CACHE_HOME, but then goes with the -- default paths.