Allow for optional external viewer args

In order to pass in options like `--new-window` to an external viewer like
`firefox`, optional args can now be defined in configuration. See
config-example.yaml for an example.
This commit is contained in:
Dave Gallant
2020-04-04 22:55:33 -04:00
parent 49ea48976d
commit 073db44b81
6 changed files with 24 additions and 14 deletions

View File

@@ -13,8 +13,9 @@ import (
// Configuration stores the global config
type Configuration struct {
Feeds []string `yaml:"feeds"`
ExternalViewer string `yaml:"externalViewer,omitempty"`
Feeds []string `yaml:"feeds"`
ExternalViewer string `yaml:"externalViewer,omitempty"`
ExternalViewerArgs []string `yaml:"externalViewerArgs,omitempty"`
}
// DefaultConfiguration can be used if a config is missing
@@ -22,6 +23,7 @@ var DefaultConfiguration = Configuration{
Feeds: []string{
"https://news.ycombinator.com/rss",
"https://www.reddit.com/r/golang/.rss",
"https://www.reddit.com/r/linux/.rss",
"https://www.zdnet.com/topic/security/rss.xml",
},
}