about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-11 22:38:08 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-11 22:38:08 +0100
commit304640f7f7443a11753cdcea26926090daa59de0 (patch)
treed88c679ddb84af93f6bfd577345a8cacd9ea6ffb /src
parent5931e0a5578852dcd0a7d7820be3012f2132f848 (diff)
downloadchawan-304640f7f7443a11753cdcea26926090daa59de0.tar.gz
Add visual-home, rename undocumented config values
Diffstat (limited to 'src')
-rw-r--r--src/config/config.nim14
-rw-r--r--src/main.nim2
2 files changed, 11 insertions, 5 deletions
diff --git a/src/config/config.nim b/src/config/config.nim
index 19cf9a8a..aa67152d 100644
--- a/src/config/config.nim
+++ b/src/config/config.nim
@@ -45,6 +45,7 @@ type
     siteconf: seq[StaticSiteConfig]
     forceclear*: bool
     emulateoverline*: bool
+    visualhome*: string
 
   BufferConfig* = object
     userstyle*: string
@@ -148,10 +149,15 @@ proc readUserStylesheet(dir, file: string): string =
 proc parseConfig(config: Config, dir: string, t: TomlValue) =
   for k, v in t:
     case k
-    of "startup":
-      config.startup = v.s
-    of "headless":
-      config.headless = v.b
+    of "start":
+      for k, v in v:
+        case k
+        of "visual-home":
+          config.visualhome = v.s
+        of "run-script":
+          config.startup = v.s
+        of "headless":
+          config.headless = v.b
     of "page":
       for k, v in v:
         config.nmap[getRealKey(k)] = v.s
diff --git a/src/main.nim b/src/main.nim
index 22a3bfd2..84b57bcf 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -108,7 +108,7 @@ while i < params.len:
 
 if pages.len == 0 and stdin.isatty():
   if visual:
-    pages.add("about:cha")
+    pages.add(conf.visualhome)
   else:
     let http = getEnv("HTTP_HOME")
     if http != "": pages.add(http)