Added monochrome CLI flag

pull/222/head
CodyGramlich 2018-09-29 11:17:51 -06:00
rodzic 99d8468920
commit e4761be367
2 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -23,6 +23,7 @@ var (
_ = pflag.String("firefox.path", "firefox", "Path to Firefox executable")
_ = pflag.Bool("firefox.with-gui", false, "Don't use headless Firefox")
_ = pflag.Bool("firefox.use-existing", false, "Whether Browsh should launch Firefox or not")
_ = pflag.Bool("monochrome", false, "Start browsh in monochrome mode")
)
func getConfigNamespace() string {

Wyświetl plik

@ -16,6 +16,7 @@ var (
uiHeight = 2
// IsMonochromeMode decides whether to render the TTY in full colour or monochrome
IsMonochromeMode = false
color_mode = "true_color"
)
func setupTcell() {
@ -24,6 +25,7 @@ func setupTcell() {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}
IsMonochromeMode = viper.GetBool("monochrome")
screen.EnableMouse()
screen.Clear()
}