wip on color schemes
import app.log
import curses
+import json
+import os
import re
import sys
import time
@@ -473,6 +475,18 @@ prefs = {
},
}
+if 1:
+ prefsPath = os.path.expanduser(os.path.expandvars(
+ "~/.ci_edit/prefs/color_scheme.json"))
+ if os.path.isfile(prefsPath) and os.access(prefsPath, os.R_OK):
+ with open(prefsPath, 'r') as f:
+ try:
+ foo = json.loads(f.read())
+ app.log.startup(foo)
+ prefs['colors'].update(foo)
+ except:
+ app.log.startup('failed to parse color scheme prefs')
+
grammars = {}
# Arrange all the grammars by name.
