top | item 37812206

(no title)

mfontani | 2 years ago

I had a long battle with making kitty work with tmux. I settled on the following in ~/.tmux.conf, before moving to wezterm for good. Maybe it fixes things for you, too:

    set -g default-terminal xterm-256color
    set-option -sa terminal-overrides ',xterm-kitty:RGB'
    set-option -ga terminal-overrides ",xterm*:Tc:smcup@:rmcup@"
    set-option -ga terminal-overrides ",screen*:Tc:smcup@:rmcup@"
    set-option -ga terminal-overrides ",tmux*:Tc:smcup@:rmcup@"
I honestly don't know whether all are needed, or only some. But with these, it worked well for me.

discuss

order

KolenCh|2 years ago

I tried the first line and in some situations (specifically with some remotes, i.e. kitty -> ssh -> tmux with that 1st line) it still won't fix it.

I gave up kitty because the author obviously don't like tmux and is advising users not to use it. So it is more like a choice between kitty and tmux. Giving up kitty is easier for me in terms of features and time for retraining.

What's your reason to migrate from kitty to wezterm?

mfontani|2 years ago

> What's your reason to migrate from kitty to wezterm?

My reason to no longer using kitty is simple: I don't like having to copy kitty's terminfo data to every single system I connect to in order to have my terminal work.

It's fine for those few systems I very often connect to, of course.

But I also connect to ephemeral systems, sometimes for a short session, and the toil and friction inherent in having to do that just isn't worth it.

Sure, "kitty +kitten ssh ..." can work in most people's scenarios. Didn't quite work in mine, due to various intricacies about my ssh setup - multiple ssh keys, handled mostly by ssh-ident.

wezterm Just Worked for me. As I got "back" to also using other systems like Windows and MacOS, it Just Worked there, too. No fiddling with terminfo, no fiddling with $TERM, either.

Happy days.

mfontani|2 years ago

> I tried the first line and in some situations (specifically with some remotes, i.e. kitty -> ssh -> tmux with that 1st line) it still won't fix it.

You likely need all of them ;-)

IIRC it "fixes" terminfo stuff "within tmux" for kitty regardless of what $TERM is set. Mind you, I was using the latest tmux at that time. tmux 3.2?

Here's the issue I had: https://github.com/kovidgoyal/kitty/issues/3018

Looks like it should be fixed on a very recent tmux; otherwise this MIGHT help:

    set-option -as terminal-features ',xterm-kitty:RGB'
... or not.