summaryrefslogtreecommitdiff
path: root/ui/ui.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 /ui/ui.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 '')
-rw-r--r--ui/ui.go33
1 files changed, 21 insertions, 12 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 859f32a..d37c495 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -11,21 +11,26 @@ import (
)
type Config struct {
- NickColWidth int
- ChanColWidth int
- ChanColEnabled bool
- MemberColWidth int
- MemberColEnabled bool
- TextMaxWidth int
- AutoComplete func(cursorIdx int, text []rune) []Completion
- Mouse bool
- MergeLine func(former *Line, addition Line)
- Colors ConfigColors
+ NickColWidth int
+ ChanColWidth int
+ ChanColEnabled bool
+ MemberColWidth int
+ MemberColEnabled bool
+ TextMaxWidth int
+ AutoComplete func(cursorIdx int, text []rune) []Completion
+ Mouse bool
+ MergeLine func(former *Line, addition Line)
+ Colors ConfigColors
+ HideMultiLineNickEnabled bool
+ HideMultiLineNickChar string
}
type ConfigColors struct {
- Unread tcell.Color
- Nicks ColorScheme
+ Unread tcell.Color
+ Nicks ColorScheme
+ ServerForeground tcell.Color
+ ChanForegroundInactive tcell.Color
+ ChanForegroundActive tcell.Color
}
type UI struct {
@@ -58,6 +63,10 @@ func New(config Config) (ui *UI, err error) {
ui.memberWidth = config.MemberColWidth
}
+ if config.HideMultiLineNickEnabled && config.HideMultiLineNickChar == "" {
+ config.HideMultiLineNickChar = "│"
+ }
+
ui.screen, err = tcell.NewScreen()
if err != nil {
return