summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2022-08-10 13:58:18 +0200
committerdelthas <delthas@dille.cc>2022-08-10 13:59:00 +0200
commit0621fe2d0f304726b3f4be225aec22c8469cbd20 (patch)
tree2ee837691fd0be42dde55cbc883b9f43980de4cd /window.go
parentAdd 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.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/window.go b/window.go
index 6135deb..66e0a31 100644
--- a/window.go
+++ b/window.go
@@ -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)
-}