diff options
author | delthas <delthas@dille.cc> | 2022-08-10 13:58:18 +0200 |
---|---|---|
committer | delthas <delthas@dille.cc> | 2022-08-10 13:59:00 +0200 |
commit | 0621fe2d0f304726b3f4be225aec22c8469cbd20 (patch) | |
tree | 2ee837691fd0be42dde55cbc883b9f43980de4cd /window.go | |
parent | Add support for soju.im/bouncer-networks-notify (diff) |
Color nicks in the member list the same as in the timeline
Also, change the color scheme to use more colors. Now 30 instead of 15,
and with the consistent color codes offered by the extended XTerm 256
color scheme.
Fixes: https://todo.sr.ht/~taiite/senpai/90
Diffstat (limited to 'window.go')
-rw-r--r-- | window.go | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -1,12 +1,10 @@ package senpai import ( - "hash/fnv" "strings" "time" "git.sr.ht/~taiite/senpai/ui" - "github.com/gdamore/tcell/v2" ) const welcomeMessage = "senpai dev build. See senpai(1) for a list of keybindings and commands." @@ -86,15 +84,3 @@ func (app *App) setBufferNumbers() { showBufferNumbers := len(command) != 0 && strings.HasPrefix("buffer", command) app.win.ShowBufferNumbers(showBufferNumbers) } - -func identColor(ident string) tcell.Color { - h := fnv.New32() - _, _ = h.Write([]byte(ident)) - return tcell.Color((h.Sum32()%15)+1) + tcell.ColorValid -} - -func identString(ident string) ui.StyledString { - color := identColor(ident) - style := tcell.StyleDefault.Foreground(color) - return ui.Styled(ident, style) -} |