summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2023-01-15 17:25:25 +0100
committerJordan Bracco <href@random.sh>2023-01-15 17:32:46 +0100
commitcc80d8c82c2d510ab14e9dd58316cf748c653b08 (patch)
tree76c41e3aa7c765c00bbfe71f5a447030831413b1 /config.go
parentfeat(ui): improve /TOPIC ui (diff)
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
Diffstat (limited to 'config.go')
-rw-r--r--config.go24
1 files changed, 18 insertions, 6 deletions
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)
}