News for hackers. Stuff that matters.
Re:Comprehensive Keyboard Handling in Terminals by galkk on Sunday April 02, 2023 @03:53AM (#35408226)
Kovid is one of those 10x engineers for me. I love kitty and use it every day, calibre does it job too.

Great, that he tries to make progress in terminal area, that, as for me, is quite archaic as of now.

Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Sunday April 02, 2023 @06:50AM (#35409198)
I have never quite understood what the benefit of using kitty is. My default terminal emulator just isn’t using that many resources and I don’t get why I would even want GPU rendering for text.

What problem does it solve for you?

Re:Comprehensive Keyboard Handling in Terminals by petepete on Sunday April 02, 2023 @07:22AM (#35409393)
It's _really_ responsive, whether you're in an editor or accidentally grepped a minified JavaScript file.

I would be capable of working entirely in any modern terminal emulator, but Kitty makes it a pleasure.

Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @02:44AM (#35419435)
Aren't these more about the tools you are using instead of the terminal emulator? Or does kitty use its own grep command?

I use vim as my main editor and while I usually stick with default terminal I have tried others in the past and at least I cant tell a difference in normal usage.

Re:Comprehensive Keyboard Handling in Terminals by petepete on Monday April 03, 2023 @04:03AM (#35420097)
It's not the grep that's slow, it's the printing of a hundred thousand character minified line of JavaScript. Unintentional, but every dev's done it or similar. I used to have to kill urxvt, which I used for nearly 15 years.
Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @06:26AM (#35421138)
>printing of a hundred thousand character minified line of JavaScript.

Yeah... Terminal is not the issue, rather why you have 100000 line js file in the first place.

Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @10:31AM (#35424214)
This really started to bother me. How does terminal emulator speed up grepping a large file?

I made a random file with 100 000 lines and using 3 different terminals (Default Terminal, iTerm2, and Kitty) and using two different grep tools (grep and rip-grep) with and without tmux I can not see any meaningful performance difference.

Do I just not understand what terminal emulators do? How does choice of text printing matter when you run a script?

I could see a tiny performance improvement with kitty when I ran just cat on the file in a loop, but the difference was so tiny that if you want to argue that this is the performance benefit worth using kitty for I have bad news for you since the worst case with kitty was then noticeably worse than in competition.

Re:Comprehensive Keyboard Handling in Terminals by petepete on Tuesday April 04, 2023 @07:15PM (#35447127)
Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Wednesday April 05, 2023 @01:50AM (#35449860)
Yes? Why do you need 100000 characters of JS? Maybe de-bloat your shit. Also grepping through that is even easier than 100_000 lines (which I assumed you meant since grepping over one line of 1_000_000 characters takes so little time that is not any kind of argument)
Re:Comprehensive Keyboard Handling in Terminals by petepete on Wednesday April 05, 2023 @04:23PM (#35459866)
It's not the grepping that takes the time, it's the printing the highlighted output to the terminal. Keep up.
Re:Comprehensive Keyboard Handling in Terminals by kzrdude on Sunday April 02, 2023 @06:56AM (#35409239)
Terminals have some infuriating limitations, like imagine not being able to tell the difference between Esc + A or Alt + A as an application. Or that tab and Ctrl + I produce identical input.

Kitty has a new keyboard handling protocol, and Neovim supports it. So if you use kitty, you can use key mappings in neovim in a more predicatable and flexible way.

Re:Comprehensive Keyboard Handling in Terminals by kps on Sunday April 02, 2023 @02:08PM (#35413382)
But xterm and xterm-compatibles have been able to do this for over a decade (CSI > 4 ; 2 m).
Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @02:40AM (#35419404)
While that sounds like a good thing is Esc+<key> really that useful of a bind when you already have Ctrl/Alt + <key> and you can get twice the keys if you add shift in the mix.

Of course your workflow is yours.

Re:Comprehensive Keyboard Handling in Terminals by kzrdude on Monday April 03, 2023 @06:06AM (#35420999)
When Alt+a looks the same as Esc+a, then the program has to wait biefly after it sees you press Esc - the continuation could mean it's really Alt+a you want to send.

That latency interferes just with a plain Esc key press. There's no weird use case in this.

Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @06:28AM (#35421160)
Either my terminal does some magic or this is not true. Most of my vim & tmux commands are alt+something and these execute as soon as I press the bind.

Or does tmux make them work automagically?

Re:Comprehensive Keyboard Handling in Terminals by kzrdude on Monday April 03, 2023 @09:53AM (#35423561)
Maybe https://neovim.io/doc/user/options.html#'ttimeout' could be evidence that it's not a problem that I've made up, it exists in some terminals. My comment was about that latency of pressing a single Esc.
Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @10:21AM (#35424022)
I also can't say I've noticed such latency
Re:Comprehensive Keyboard Handling in Terminals by leephillips on Sunday April 02, 2023 @08:32AM (#35409877)
I’ve tried many terminal emulators, probably all available on Linux, and kitty is the best in my experience. Performance is excellent: keyboard latency, catting files. It’s sometimes convenient to use some of its tricks, such as viewing an image right in the terminal through ssh.
Re:Comprehensive Keyboard Handling in Terminals by AndyKluger on Sunday April 02, 2023 @05:30PM (#35415456)
Have you tried wezterm as well?
Re:Comprehensive Keyboard Handling in Terminals by leephillips on Sunday April 02, 2023 @08:22PM (#35416947)
I don’t think so. Maybe I shouldn’t have said “all”.
Re:Comprehensive Keyboard Handling in Terminals by ploum on Sunday April 02, 2023 @08:59AM (#35410049)
Also support displaying picture (try chafa with any jpg/png file inside kitty). That makes browsing with offpunk a completely different experience.
Re:Comprehensive Keyboard Handling in Terminals by seri4l on Sunday April 02, 2023 @09:28AM (#35410286)
You can configure a key combination to run a pager on the last command output, color and everything. You can also configure it so that it pipes the output of a command to a pager automatically whenever it is more than a screen long.
Re:Comprehensive Keyboard Handling in Terminals by gorgoiler on Sunday April 02, 2023 @09:40AM (#35410379)
* * *
Re:Comprehensive Keyboard Handling in Terminals by AndyKluger on Monday April 03, 2023 @02:33PM (#35429044)
FWIW Wezterm supports Windows.
Re:Comprehensive Keyboard Handling in Terminals by nvarsj on Sunday April 02, 2023 @09:59AM (#35410571)
kitty is the most feature complete terminal emulator out there. It’s the only one that properly supports ligatures and variable width characters for instance. If you want faithful terminal reproduction with built in native tmux like functionality (including non broken mouse support), kitty is about the only option.
Re:Comprehensive Keyboard Handling in Terminals by NotEvil on Sunday April 02, 2023 @02:43PM (#35413769)
Wezterm is feature parity with kitty. But can be configured in lua instead of a long custom text file with vim tag support
Re:Comprehensive Keyboard Handling in Terminals by tmtvl on Sunday April 02, 2023 @02:43PM (#35413772)
No it isn't, I have version 0.27.1 installed and it reports itself as a VT220 rather than VT420 (like xterm), or VT520 (like Zutty). And even despite purporting to be a VT220 it still fails on LineFeed Mode, DSR, and SRM; which the developer of Zutty called out back in 2020: https://tomscii.sig7.se/2020/12/A-totally-biased-comparison-...
Re:Comprehensive Keyboard Handling in Terminals by AndyKluger on Sunday April 02, 2023 @05:29PM (#35415447)
Are you saying that because you've found something missing from wezterm, or because you're not considering wezterm at all?
Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @02:42AM (#35419421)
>It’s the only one that properly supports ligatures and variable width characters for instance.

Are these like "powerline fonts" or what? Where are these used?

Re:Comprehensive Keyboard Handling in Terminals by leephillips on Monday April 03, 2023 @09:52AM (#35423551)
> variable width characters

Do you mean such things as wide Unicode glyphs? Because it doesn’t seem to support variable-width fonts.

Re:Comprehensive Keyboard Handling in Terminals by version_five on Sunday April 02, 2023 @10:07AM (#35410639)
Being able to display inline images in the terminal
Re:Comprehensive Keyboard Handling in Terminals by nextlevelwizard on Monday April 03, 2023 @02:44AM (#35419441)
How often do you need this? Feels a pretty niche need. Also not the only terminal emulator capable of this.
Re:Comprehensive Keyboard Handling in Terminals by toastal on Sunday April 02, 2023 @11:12AM (#35411359)
Joining in questioning… kitty dev seems to hate tmux since kitty can perform many of it's behaviors. The thing that's most interesting to me is tmux for detaching and persisting a session on a remote host. Does kitty cover this functionality too? Is there like kittyd?
Re:Comprehensive Keyboard Handling in Terminals by kps on Sunday April 02, 2023 @02:10PM (#35413406)
If persisting sessions is the only thing you use tmux or screen for (as it was for me), try `dtach`. Session management is all it does; terminal I/O is passed through just like a plain ssh session.
Re:Comprehensive Keyboard Handling in Terminals by toastal on Monday April 03, 2023 @07:35AM (#35421767)
its* behaviors
Re:Comprehensive Keyboard Handling in Terminals by galkk on Thursday April 06, 2023 @07:00PM (#35475692)
I use tmux for remote and i3 for local use, so I don’t use kittys window management functions. I know author stance on tmux and do not share it
Re:Comprehensive Keyboard Handling in Terminals by mftb on Sunday April 02, 2023 @01:20PM (#35412844)
Kitty renders more cases correctly, more stable, mainly I appreciate it's overall high quality. I don't use it's tmux-like features.
Re:Comprehensive Keyboard Handling in Terminals by galkk on Thursday April 06, 2023 @06:57PM (#35475674)
Kitty is fast, configurable and support ligatures.
Re:Comprehensive Keyboard Handling in Terminals by Version467 on Sunday April 02, 2023 @08:17AM (#35409778)
I didn't know he also made calibre. That's awesome.
Re:Comprehensive Keyboard Handling in Terminals by kickaha on Sunday April 02, 2023 @11:49AM (#35411798)
Calibre user. I was like, that’s weird. There’s another Kovid Goyal?