aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2017-06-06 14:07:46 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2017-06-06 14:07:46 +0200
commit5985125e2e62bc4cf7bf85b104c85620daed25a4 (patch)
tree0623afbb458f7e70fc993573bb2d2418854b220b
parentdcea5ffd358d3b5f5cff654f4befd03b9729e719 (diff)
downloaddotfiles-5985125e2e62bc4cf7bf85b104c85620daed25a4.tar.gz
dotfiles-5985125e2e62bc4cf7bf85b104c85620daed25a4.zip
make lumail2 config XDG_BASE_DIR ready
-rw-r--r--config/lumail2/lumail2.lua (renamed from lumail2/lumail2.lua)17
1 files changed, 9 insertions, 8 deletions
diff --git a/lumail2/lumail2.lua b/config/lumail2/lumail2.lua
index a301a92..8e66daf 100644
--- a/lumail2/lumail2.lua
+++ b/config/lumail2/lumail2.lua
@@ -20,9 +20,11 @@ keymap['global']['G'] = 'last()'
Config:set( "global.iconv", 1 )
--
--- Get our home-directory, as this is often used.
+-- Get our base-directories
--
local HOME = os.getenv("HOME")
+local DATA_HOME = os.getenv("XDG_DATA_HOME") or HOME .. "/.local/share"
+local CACHE_HOME = os.getenv("XDG_CONFIG_HOME") or HOME .. "/.cache"
--
-- The default Maildir location is ~/Maildir
@@ -80,12 +82,16 @@ Config:set( "global.editor", editor .. " +/^$ ++8" )
--
-- Save persistant history of our input in the named file.
--
-Config:set( "global.history", HOME .. "/.lumail2/history" )
+Config:set( "global.history", DATA_HOME .. "/lumail2/history" )
--
-- Configure a cache-prefix, and populate it
--
-Config:set( "cache.prefix", HOME .. "/.lumail2/cache" )
+Config:set( "cache.prefix", CACHE_HOME .. "/lumail2/" )
+
+-- Configure logging
+Config:set( "log.path" , DATA_HOME .. "/.lumail2/log" )
+Config:set ( "log.level", "")
-- Index mode - which shows the list of messages:
--
@@ -136,7 +142,6 @@ for i,o in ipairs(Global:modes()) do
colour_table[o] = {}
end
-
--
-- Setup our colours - for Maildir-mode
--
@@ -167,10 +172,6 @@ colour_table['message'] = {
['^>%s$'] = 'blue',
}
--- set logfile
-Config:set( "log.path" , HOME .. "/.lumail2/log" )
-Config:set ( "log.level", "debug")
-
--
-- Include address book completion in on_complete
--