Enforce true color profile
This commit is contained in:
parent
c4de4bceee
commit
7fabfe4185
5
main.go
5
main.go
@ -12,6 +12,7 @@ import (
|
|||||||
bm "github.com/charmbracelet/wish/bubbletea"
|
bm "github.com/charmbracelet/wish/bubbletea"
|
||||||
lm "github.com/charmbracelet/wish/logging"
|
lm "github.com/charmbracelet/wish/logging"
|
||||||
"github.com/gliderlabs/ssh"
|
"github.com/gliderlabs/ssh"
|
||||||
|
"github.com/muesli/termenv"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"math"
|
"math"
|
||||||
@ -47,7 +48,7 @@ func main() {
|
|||||||
wish.WithHostKeyPath(".ssh/term_info_ed25519"),
|
wish.WithHostKeyPath(".ssh/term_info_ed25519"),
|
||||||
wish.WithMiddleware(
|
wish.WithMiddleware(
|
||||||
lm.Middleware(),
|
lm.Middleware(),
|
||||||
bm.Middleware(teaHandler),
|
bm.MiddlewareWithColorProfile(teaHandler, termenv.TrueColor),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -110,6 +111,7 @@ func teaHandler(s ssh.Session) (tea.Model, []tea.ProgramOption) {
|
|||||||
err: nil,
|
err: nil,
|
||||||
dictionary: dictionary,
|
dictionary: dictionary,
|
||||||
textInput: ti,
|
textInput: ti,
|
||||||
|
username: s.User(),
|
||||||
ip: s.RemoteAddr().String(),
|
ip: s.RemoteAddr().String(),
|
||||||
words: []word{},
|
words: []word{},
|
||||||
progressBar: progress.New(progress.WithScaledGradient("#FF7CCB", "#FDFF8C")),
|
progressBar: progress.New(progress.WithScaledGradient("#FF7CCB", "#FDFF8C")),
|
||||||
@ -130,6 +132,7 @@ type model struct {
|
|||||||
err error
|
err error
|
||||||
dictionary map[string]word
|
dictionary map[string]word
|
||||||
textInput textinput.Model
|
textInput textinput.Model
|
||||||
|
username string
|
||||||
ip string
|
ip string
|
||||||
words []word
|
words []word
|
||||||
wordsViewport viewport.Model
|
wordsViewport viewport.Model
|
||||||
|
Loading…
Reference in New Issue
Block a user