awful.util: Add getters for themes and icon paths
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8953218e5c
commit
20c9723c5b
|
@ -39,7 +39,7 @@ end
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- Themes define colours, icons, font and wallpapers.
|
-- 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.
|
-- This is used later as the default terminal and editor to run.
|
||||||
terminal = "xterm"
|
terminal = "xterm"
|
||||||
|
|
|
@ -158,6 +158,18 @@ function util.get_cache_dir()
|
||||||
return util.get_xdg_cache_home() .. "awesome/"
|
return util.get_xdg_cache_home() .. "awesome/"
|
||||||
end
|
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.
|
--- Get the user's config or cache dir.
|
||||||
-- It first checks XDG_CONFIG_HOME / XDG_CACHE_HOME, but then goes with the
|
-- It first checks XDG_CONFIG_HOME / XDG_CACHE_HOME, but then goes with the
|
||||||
-- default paths.
|
-- default paths.
|
||||||
|
|
Loading…
Reference in New Issue