summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/init.go b/init.go
index a53076f..7545da0 100644
--- a/init.go
+++ b/init.go
@@ -50,16 +50,22 @@ func init() {
me.textbox.wId = -55
me.stdout.wId = -4
- // macos iterm2 really only works with dark mode right now
- if runtime.GOOS == "macos" {
- me.dark = true
- }
-
// Set(&me, "dense")
me.myTree = tree.New()
me.myTree.PluginName = "gocui"
+ if val, err := me.myTree.ConfigFind("dark"); err == nil {
+ if val == "true" {
+ me.dark = true
+ }
+ } else {
+ // macos iterm2 really only works with dark mode right now
+ if runtime.GOOS == "macos" {
+ me.dark = true
+ }
+ }
+
me.myTree.NodeAction = newaction
me.myTree.Add = newAdd
me.myTree.SetTitle = newSetTitle