r/KittyTerminal • • 9h ago

Bouncing balls Inside Neovim (Kitty graphics protocol)

2 Upvotes

r/KittyTerminal • • 15h ago

GT San Andreas in a terminal emulator

39 Upvotes

Just testing the limits of what is possible here using the kitty graphics protoccol on ghostty. This is actually just the original ps2 game decompiled to C++ and recompiled into wasm using the ps2 runtime from https://github.com/snuri00/ps2-web-recomp...

But that is not what we care about here!

katnav is a experimental webbrowser using CEF (because nothing else would run gta on terminal so well so I just used chromium) and kitty graphics protccol: https://github.com/h4ks-com/katnav

I did this as a way of testing a graphics/game-engine/ui lib I am working on: https://github.com/h4ks-com/katui

Chrome renders WebGL normally and katui will convert it into rectangular tiles that we dynamically downscale in resolution, diff trying to update only what changed (which makes some sense for UIs but not as much for a game stream like that), compresses and base64 it in parallel. Most of the heavy lifting is done by the library itself.

According to my benchmarks I can get 36MB/s on kitty allowing 32 fps, while for ghostty 85 MB/s allowing 61 fps when 100% of the tiles change. Of course this varies between harware.

And yes you can use katnav for browsing the normal web, it is an actual browser, check the github ;)

I am making this experiment mostly for fun, so it is pretty much fully vibecoded, but I tried to keep the maximum architetrual overview and coverage with static analysis checks. Feel free to reach me out if you find this interesting and would like to bring it further. In theory now I could put any graphical application in the terminal. Not sure if someone has already done that?


r/KittyTerminal • • 17h ago

ytk: browse and watch YouTube from the terminal, with thumbnails in kitty (Python + yt-dlp + mpv)

3 Upvotes

I wanted to search and watch YouTube without leaving the terminal, but most TUI clients show only text. ytk uses kitty's graphics protocol to draw a 3×3 grid of thumbnails, then plays the video with mpv.

What it does

- Search videos, playlists, or both mixed in (like the website)

- Open a video's channel and switch between its videos and playlists

- Info panel: channel and subscribers, views, likes, date, resolution, description

- Play whole playlists and YouTube Mixes; jump to any song while one is playing

- Resume where you left off, plus a history

- Download audio or video in the background, and play the local file afterwards

- English and Spanish interface (follows your system language, space L toggles it)

- It also works inside zellij

How it works

It's a single small Python package with no dependencies besides what you probably already have: yt-dlp for search and metadata, mpv for playback, and kitty for the images. It's driven by a LazyVim-style leader key: press space and a menu shows the available actions, so you don't have to memorize anything.

git clone https://github.com/anton-arck/ytk.git ~/.local/share/ytk

ln -sf ~/.local/share/ytk/bin/ytk ~/.local/bin/ytk

ytk arch linux

Caveats

- You need kitty (or a terminal that supports its graphics protocol).

- It relies on yt-dlp, which reads YouTube without an official API. When YouTube changes something it can break until yt-dlp is updated, so update yt-dlp first if something fails.

- Linux only so far; I've only tested it on Arch (sway).

It's MIT licensed. Feedback, bug reports and ideas are very welcome, especially from people on other distros or terminals.

Repo: https://github.com/anton-arck/ytk


r/KittyTerminal • • 2d ago

Kitty graphics protocol in Neovim (Basics with examples)

Thumbnail
youtube.com
33 Upvotes

The Kitty Graphics Protocol has been adopted by many terminal applications. Neovim 0.13 also uses it to display images.

In this video, I'll explain the basics of the Kitty Graphics Protocol and how to use it with Neovim and Lua.

I'll cover:

  • How communication between Neovim and Kitty works.

  • The structure of Kitty escape sequences.

  • How to send escape sequences using the Neovim API.

Examples:

  • Draw a pixel.

  • Draw basic shapes.

  • Change the cursor position.

  • Clear the screen.

  • Create basic animations.

  • Create a basic sprite animation.

Even though I'll be using Lua and Neovim, I'll explain the protocol itself so you can transfer this knowledge to your favorite programming language.

Source code:
https://github.com/FractalCodeRicardo/dev-config/tree/master/nvim/lua/my/kitty-protocol


r/KittyTerminal • • 2d ago

Small gap when using nvim

Post image
3 Upvotes

Sorry if this is the wrong place to post this.

When i enter neovim, there is a small gap, i tried setting window_padding_width to 0, a bunch of other stuff too, but I cant get it to work, im new to this, can anyone help me?


r/KittyTerminal • • 7d ago

Coding a Mandelbulb screensaver Kitty shader

Thumbnail
youtu.be
17 Upvotes

A few days ago, I created a Mandelbulb fractal using C, Raylib, and GLSL. Now I want to bring it to my terminal using a Kitty shader.

In this video, I'll use my original GLSL code as a starting point and adapt it to work as a Kitty terminal shader.

I'll explain the code, explore some raymarching techniques, and share the references I used along the way.

Source code:
https://github.com/FractalCodeRicardo/dev-config/blob/master/kitty/shaders/mandelbulb.slang


r/KittyTerminal • • 7d ago

The Quantum PhD Gigalord strikes again!

Thumbnail
youtu.be
14 Upvotes

r/KittyTerminal • • 11d ago

file-browser-tui (kitty+ratatui)

Post image
19 Upvotes

r/KittyTerminal • • 11d ago

Notch app that tracks coding agents running in kitty

5 Upvotes

I run Claude Code and Codex in kitty windows and kept missing when one was waiting for me. So I built Openbar: every session sits in one list in the notch, the one that needs you jumps to the top, and "Open" takes you straight to the right kitty window. You can also send a reply from there.

Free, open source: https://github.com/MF-DEEV/Openbar


r/KittyTerminal • • 11d ago

why does clear_terminal not repaint prompt

1 Upvotes

i was surprised at clear commands (to clarify, /usr/bin/clear) behavior in kitty, unique and grounded in reason so i wont debate it. but neither of the "stronger" clear_terminal variants (clear active and reset active) that reset the scrollback repaint the prompt afterward. of course, the workaround for this was binding this little fish function to a key, but

function __s_clear_screen_and_scrollback
  printf "\e\[H\e\[3J"
  commandline -f repaint
end

but im more curious how this kitty behavior is considered normal?


r/KittyTerminal • • 13d ago

Configuración de Fastfetch + Kitty con temática de Ado y Bash predictivo

Thumbnail gallery
7 Upvotes

r/KittyTerminal • • 13d ago

Kitty 0.50.0 Released

Thumbnail
sw.kovidgoyal.net
129 Upvotes

r/KittyTerminal • • 17d ago

How do I delete a selection?

3 Upvotes

Pressing backspace doesn't work for whatever reason and I could't find anything online

Also, is there a way to change the text cursor's position by left clicking on the text, instead of exclusively with the arrow keys?

Edit: figured it out (the cursor thing not the selection)


r/KittyTerminal • • 18d ago

Feature request for light and dark mode

1 Upvotes

God bless you

Can we have

Tabs

active_tab_background #

active_tab_foreground #

inactive_tab_background #

inactive_tab_foreground #

tab_bar_background #

in the config for them?

Thanks!

EDIT: God bless you!

Sorry I drink almost a bottle of wine but now I made a GitHub request, then you will understand!

https://github.com/kovidgoyal/kitty/issues/10782


r/KittyTerminal • • 18d ago

Color overrrides seem to be ignored

5 Upvotes

Hi! This is probably a dumb question; I'm fairly new to Kitty. (Also, I'm using a version of Kitty packaged by a distro, 0.39.1 in the machine I'm sitting at right now, although its manpage confirms that -o/--override should work, and very old documentation I've found confirms that it worked for some people many years ago.)

Overrides specified on the command-line with -o/--override seem to just be ignored. My theme specifies (for instance)

foreground #000000
background #ffffff
selection_foreground #000000
selection_background #ffc000

but if I say kitty -o foreground=#0000ff -o background #ffff00 I still get plain black-on-white.

Here's my kitty.conf with comments stripped (and multiple blank lines merged):

font_family      family="DejaVu Sans Mono"
bold_font        auto
italic_font      auto
bold_italic_font auto

font_size 9.0

text_composition_strategy 1.7 30

remember_window_size  no
initial_window_width  80c
initial_window_height 40c

include current-theme.conf

And here's my current-theme.conf, similarly trimmed:

foreground #000000
background #ffffff
selection_foreground #000000
selection_background #ffc000

cursor #0969da

tab_bar_background #f6f8fa
active_tab_foreground #24292f
active_tab_background #ffffff
inactive_tab_foreground #57606a
inactive_tab_background #f6f8fa

color0 #24292f
color8 #57606a

color1 #b35900
color9 #8a4600

color2 #0550ae
color10 #0969da

color3 #4d2d00
color11 #633c01

color4 #0969da
color12 #218bff

color5 #8250df
color13 #a475f9

color6 #1b7c83
color14 #3192aa

color7 #6e7781
color15 #8c959f

What am I doing wrong?

For background: I have a little script I use to SSH to remote hosts (or username/host combinations) that generates foreground and background colors on the fly and passes them to the terminal emulator command on the fly, so (theoretically) I could have all my sessions connecting to hosts in one cluster be shades of lavender, but not identical shades of lavender so I can distinguish one host from another, and I can have all my sessions connecting to hosts in another cluster be shades of green (again, distinguishing individual hosts by IP address or hostname), and my SSH to root on my router can be yellow-on-red while my SSH to a nonprivileged user on the router can have a different color scheme. (It also does fonts.) I've gotten that working (at various times) with GNOME terminal, XFCE terminal, and Xterm, and the script has rudimentary support for picking the best terminal emulator available and choosing command-line options appropriately.

I'd like to support kitty in that script, and if I can get that working I'll start using it as my main terminal emulator, rather than just switching to it ad-hoc when I want one of its features (mainly image display in remote sessions). But that depends on being able to pass dynamically calculated colors on the command-line and having them override colors specified in my theme.

Thanks to anybody who has advice!


r/KittyTerminal • • 19d ago Bravo

Using the kitty graphics protocol to render LaTeX formulas inside Claude Code

169 Upvotes

Small project built on the kitty graphics protocol: a Claude Code plugin that compiles the $$...$$ formulas the AI writes (latex + dvipng) and draws them inline in kitty instead of showing raw LaTeX source.

It sizes each image to whole terminal cells (rendered at 2x DPI, then fit to the cell grid) so it scrolls with the text. Also works in Ghostty and through tmux with passthrough.

Code (MIT): https://github.com/kbrianps/claude-latex-math


r/KittyTerminal • • 20d ago

I made a shader wallpaper app for GNOME (and Kitty)

16 Upvotes

r/KittyTerminal • • 20d ago

My new fav rice

Post image
0 Upvotes

r/KittyTerminal • • 20d ago

Using kitty's graphics protocol to show images inline in Claude Code (free mod)

2 Upvotes

I use Claude Code (the CLI) a lot, and when it reads a screenshot the transcript only says "Read 1 file". So I built a small mod that uses the kitty graphics protocol to draw those PNGs right under that line, small, with the path below as a clickable link. Images Claude sends you show up larger, with the caption.

Tested in kitty and Ghostty, and in tmux with allow-passthrough on. Terminals without the protocol get a plain "[image] name.png" line instead, so nothing breaks.

Free and open source (MIT). Install inside Claude Code: /plugin install inline-images --marketplace kbrianps/claude-inline-images

https://github.com/kbrianps/claude-inline-images

Thanks to Kovid for the protocol, it made this a few hundred lines instead of a project.


r/KittyTerminal • • 23d ago

Modern kitty/ghostty/rex AI Agent TUI with ACP support

1 Upvotes

hi guys! i could not find any modern TUI with acp client support. Help)


r/KittyTerminal • • 24d ago

How to check kitty terminal current FPS?

8 Upvotes

Hi everyone.

I am using kitty terminal for nvim, when i work in nvim during typing i feel the terminal was slow.

Is there has anyway to check kitty terminal current FPS count same like msi-afterburner FPS overlay?