awful.util: add support for config dir
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8824d9f703
commit
9b722181fa
|
@ -138,9 +138,16 @@ function restart()
|
||||||
end
|
end
|
||||||
|
|
||||||
function getdir(d)
|
function getdir(d)
|
||||||
if d == "cache" then
|
if d == "config" then
|
||||||
if os.getenv("XDG_CACHE_HOME") then
|
local dir = os.getenv("XDG_CONFIG_HOME")
|
||||||
return os.getenv("XDG_CACHE_HOME").."/awesome"
|
if dir then
|
||||||
|
return dir .. "/awesome"
|
||||||
|
end
|
||||||
|
return os.getenv("HOME") .. "/.config/awesome"
|
||||||
|
elseif d == "cache" then
|
||||||
|
local dir = os.getenv("XDG_CACHE_HOME")
|
||||||
|
if dir then
|
||||||
|
return dir .. "/awesome"
|
||||||
end
|
end
|
||||||
return os.getenv("HOME").."/.cache/awesome"
|
return os.getenv("HOME").."/.cache/awesome"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue