diff options
| author | tjp <tjp@ctrl-c.club> | 2024-01-03 18:52:18 -0700 |
|---|---|---|
| committer | tjp <tjp@ctrl-c.club> | 2024-01-03 18:52:18 -0700 |
| commit | d2b94e4b874aa2639bb22eb88494cdda73d40f22 (patch) | |
| tree | 80b8193e878038b5ade592e25bd42d0aba07f8a3 /files.go | |
| parent | 859f74231f2b48d2dcf6a29682e7651b504fda12 (diff) | |
help command, quiet mode, and s/set/select
Diffstat (limited to 'files.go')
| -rw-r--r-- | files.go | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -13,11 +13,16 @@ import ( "github.com/BurntSushi/toml" ) -type Config struct { +type ConfigMain struct { DefaultScheme string `toml:"default_scheme"` SoftWrap int `toml:"soft_wrap"` DownloadFolder string `toml:"download_folder"` VimKeys bool `toml:"vim_keys"` + Quiet bool `toml:"quiet"` +} + +type Config struct { + ConfigMain `toml:"main"` } func getConfig() (*Config, error) { @@ -33,10 +38,13 @@ func getConfig() (*Config, error) { } c := Config{ - VimKeys: true, - DefaultScheme: "gemini", - SoftWrap: 80, - DownloadFolder: home, + ConfigMain{ + VimKeys: true, + DefaultScheme: "gemini", + SoftWrap: 80, + DownloadFolder: home, + Quiet: false, + }, } if _, err := toml.DecodeFile(path, &c); err != nil { return nil, err |
