diff options
author | Kalyan Sriram <kalyan@coderkalyan.com> | 2021-11-22 18:37:40 +0000 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-11-23 09:10:59 +0100 |
commit | b46900566104c0143e06df452fb994e888b23548 (patch) | |
tree | 2d4f0e14c069fd8a4a7ff91ea9ee43d87ad66b58 /cmd | |
parent | Add support for CHATHISTORY TARGETS (diff) |
config: replace YAML with scfg config format
This patch replaces the YAML configuration format with scfg
(https://git.sr.ht/~emersion/scfg).
Additionally, a few things about configuration are cleaned up:
* abbreviated names are expanded (addr -> address, nick -> nickname)
* negative bools switched to positive (no-tls -> tls)
* independent column widths are grouped under the "pane-width"
directive
* implementation of default configuration values is improved
* password-cmd is executed directly (with scfg field parsing)
instead of with "sh -c".
* on-highlight is now a file, $XDG_CONFIG_HOME/senpai/highlight by
default, which can be changed with the on-highlight-path directive
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/senpai/main.go | 2 | ||||
-rw-r--r-- | cmd/test/main.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/senpai/main.go b/cmd/senpai/main.go index 675228f..665cacc 100644 --- a/cmd/senpai/main.go +++ b/cmd/senpai/main.go @@ -34,7 +34,7 @@ func main() { if err != nil { panic(err) } - configPath = path.Join(configDir, "senpai", "senpai.yaml") + configPath = path.Join(configDir, "senpai", "senpai.scfg") } cfg, err := senpai.LoadConfigFile(configPath) diff --git a/cmd/test/main.go b/cmd/test/main.go index 804937f..6eb0574 100644 --- a/cmd/test/main.go +++ b/cmd/test/main.go @@ -108,7 +108,7 @@ func parseFlags() { if err != nil { panic(err) } - configPath = path.Join(configDir, "senpai", "senpai.yaml") + configPath = path.Join(configDir, "senpai", "senpai.scfg") } cfg, err := senpai.LoadConfigFile(configPath) @@ -121,6 +121,6 @@ func parseFlags() { if cfg.Password != nil { password = *cfg.Password } - useTLS = !cfg.NoTLS + useTLS = cfg.TLS } } |