aboutsummaryrefslogtreecommitdiff
path: root/core/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/init.lua')
-rw-r--r--core/init.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/init.lua b/core/init.lua
index da95f94c..3767a31f 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -8,7 +8,17 @@ if not WIN32 then
else
package.cpath = _HOME..'/core/?.dll;'..package.cpath
end
+
_THEME = ''
+local user_dir = os.getenv(not WIN32 and 'HOME' or 'USERPROFILE')
+if user_dir then
+ local f = io.open(user_dir..'/.ta_theme')
+ if f then
+ theme = f:read('*line'):match('[^\r\n]+')
+ f:close()
+ if theme and #theme > 0 then _THEME = theme end
+ end
+end
require 'iface'
require 'locale'