From 60544f1550999df6a55dbdfc2cbd7542fecb3314 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 23 Jan 2009 22:26:22 -0500 Subject: Look for ~/.ta_theme for setting _THEME; core/init.lua --- core/init.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/init.lua') 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' -- cgit v1.2.3