Merge branch 'export-paths' of https://github.com/psychon/awesome
This commit is contained in:
commit
df8346ceae
|
@ -377,12 +377,6 @@ if(DO_COVERAGE)
|
|||
${BUILD_DIR}/${file}
|
||||
COPYONLY)
|
||||
endforeach()
|
||||
|
||||
# There is no way to avoid that one
|
||||
configure_file(${SOURCE_DIR}/lib/awful/util.lua
|
||||
${BUILD_DIR}/lib/awful/util.lua
|
||||
ESCAPE_QUOTES
|
||||
@ONLY)
|
||||
else()
|
||||
foreach(file ${AWESOME_CONFIGURE_COPYONLY_WITHCOV_FILES})
|
||||
configure_file(${SOURCE_DIR}/${file}
|
||||
|
|
2
config.h
2
config.h
|
@ -4,6 +4,8 @@
|
|||
#define AWESOME_LUA_LIB_PATH "@AWESOME_LUA_LIB_PATH@"
|
||||
#define XDG_CONFIG_DIR "@XDG_CONFIG_DIR@"
|
||||
#define AWESOME_IS_BIG_ENDIAN @AWESOME_IS_BIG_ENDIAN@
|
||||
#define AWESOME_THEMES_PATH "@AWESOME_THEMES_PATH@"
|
||||
#define AWESOME_ICON_PATH "@AWESOME_ICON_PATH@"
|
||||
|
||||
#cmakedefine WITH_DBUS
|
||||
#cmakedefine HAS_EXECINFO
|
||||
|
|
|
@ -200,13 +200,13 @@ 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 (os.getenv('AWESOME_THEMES_PATH') or "@AWESOME_THEMES_PATH@") .. "/"
|
||||
return (os.getenv('AWESOME_THEMES_PATH') or 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 (os.getenv('AWESOME_ICON_PATH') or "@AWESOME_ICON_PATH@") .. "/"
|
||||
return (os.getenv('AWESOME_ICON_PATH') or awesome.icon_path) .. "/"
|
||||
end
|
||||
|
||||
--- Get the user's config or cache dir.
|
||||
|
|
22
luaa.c
22
luaa.c
|
@ -352,6 +352,16 @@ luaA_fixups(lua_State *L)
|
|||
* @tfield string hostname
|
||||
*/
|
||||
|
||||
/**
|
||||
* The path where themes were installed to.
|
||||
* @tfield string themes_path
|
||||
*/
|
||||
|
||||
/**
|
||||
* The path where icons were installed to.
|
||||
* @tfield string icon_path
|
||||
*/
|
||||
|
||||
static int
|
||||
luaA_awesome_index(lua_State *L)
|
||||
{
|
||||
|
@ -409,6 +419,18 @@ luaA_awesome_index(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if(A_STREQ(buf, "themes_path"))
|
||||
{
|
||||
lua_pushliteral(L, AWESOME_THEMES_PATH);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(A_STREQ(buf, "icon_path"))
|
||||
{
|
||||
lua_pushliteral(L, AWESOME_ICON_PATH);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return luaA_default_index(L);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue