From cc80d8c82c2d510ab14e9dd58316cf748c653b08 Mon Sep 17 00:00:00 2001 From: Jordan Bracco Date: Sun, 15 Jan 2023 17:25:25 +0100 Subject: Multi-WIP that I probably should have done in multiples commits: - more colors settings: - server foreground - channel foreground (active, inactive) - dumb cosmetic changes because why not (`!` -> `:(`, coloring) - temporary lines to unclutter main ui from disconnections/reconnections - display line head only once in case of multiple lines - cosmetic motd - handle 396 numeric as "server" head - improved ACTION display - imrpoved topic display bugs: - ACTION fucks up with multi-line head - multi-line head needs rework before trying upstream - what the fuck to with my cosmetic changes - document new config values --- config.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'config.go') diff --git a/config.go b/config.go index beebf7a..b212bc2 100644 --- a/config.go +++ b/config.go @@ -48,9 +48,12 @@ func parseColor(s string, c *tcell.Color) error { } type ConfigColors struct { - Prompt tcell.Color - Unread tcell.Color - Nicks ui.ColorScheme + Prompt tcell.Color + Unread tcell.Color + Nicks ui.ColorScheme + ServerForeground tcell.Color + ChanForegroundInactive tcell.Color + ChanForegroundActive tcell.Color } type Config struct { @@ -109,9 +112,12 @@ func Defaults() (cfg Config, err error) { MemberColEnabled: true, TextMaxWidth: 0, Colors: ConfigColors{ - Prompt: tcell.ColorDefault, - Unread: tcell.ColorDefault, - Nicks: ui.ColorSchemeBase, + Prompt: tcell.ColorDefault, + Unread: tcell.ColorDefault, + Nicks: ui.ColorSchemeBase, + ServerForeground: tcell.ColorDarkGray, + ChanForegroundInactive: tcell.ColorGray, + ChanForegroundActive: tcell.ColorWhite, }, Debug: false, } @@ -345,6 +351,12 @@ func unmarshal(filename string, cfg *Config) (err error) { cfg.Colors.Prompt = color case "unread": cfg.Colors.Unread = color + case "server": + cfg.Colors.ServerForeground = color + case "channel": + cfg.Colors.ChanForegroundInactive = color + case "channel-active": + cfg.Colors.ChanForegroundActive = color default: return fmt.Errorf("unknown directive %q", child.Name) } -- cgit v1.2.3