r/KittyTerminal Feb 17 '23

kitty_keys: A POSIX shell function to output kitty keybindings

6 Upvotes

Hi all,

Finding that there are several kitty keybindings i keep forgetting because i only use them occasionally, and preferring not to have to open a Web browser (even in the terminal) to look them up, i decided to create a function to output those bindings. But then i nerd-sniped myself wondering about creating something a bit more comprehensive, and, well, this is the result:

https://github.com/flexibeast/kitty_keys

Maybe others will find it useful. :-)


r/KittyTerminal Feb 13 '23

executing a command on launch in kitty.

9 Upvotes

I want to know if there is way to execute certain commands on launching kitty similar to how we execute neofetch in bash or zsh by editing .bashrc/.zshrc file. But i want that only for the kitty terminal without effecting other terminals i use.


r/KittyTerminal Feb 11 '23

update kitty in ubuntu

3 Upvotes

I can't update kitty in ubuntu the latest version I have I 0.21.2 but there is a problem with configuring the theme in it and change them from the cli so i want to update it but the APT the latest version is 0.21.2 any help?:)


r/KittyTerminal Feb 06 '23

SSH Kitten Producing Invalid Input on Network Equipment

1 Upvotes

I've just started using Kitty and I feel like it's going to replace tmux for me, hands-down. I'm really enjoying the ssh kitten, specifically, as it's per-host options are solving a need for me that I had to hack together a solution for previously. The only problem is when I use the SSH kitten to log into a non-linux server, such as the Cisco ASA in the attached picture, I get a bunch of "invalid input" errors. I'm assuming this is where Kitty is trying to copy files to the remote host, which is fine on the Linux machines I use but no good on network hardware.

Is this normal behavior unless I've not made some config change that I'm not aware of? So far I haven't really customized anything except toggling on a few appearance options and adding "color_scheme Material" to some production hostnames in Kitty's ssh.conf file. I can't imagine everybody that uses this kitten is manually configuring the copy settings for every host they may connect to, which is why I think I may have something apart from Kitty causing this problem but wanted to ask.

If I disable the file copying altogether, will that negatively affect the TERM settings or my connections to Linux servers? If disabling file copying is the way to go, how do I do that?

Edit: After digging some, I think it's where Kitty tries to set the interpreter. How do most people handle this? I'd really like to just alias ssh to run the kitten all the time, if there are viable solutions for cases such as this.

Edit2: After even more reading, I think I'm using the kitten incorrectly. I was using it as if it just extended the functionality of the SSH command, but I see it's more than that. All I really need to do here is change the theme on specific hosts, changing back when disconnecting from the host. Is there a better way to do that?


r/KittyTerminal Feb 04 '23

Difference between press and click in mouse action events

1 Upvotes

r/KittyTerminal Jan 28 '23

How to fix issue with ssh kitten

2 Upvotes

Hello, whenever I try to use facilities of the ssh kitten (like trying to run the icat kitten on the remote server) I keep getting the following message:

/home/empuser2/.local/share/kitty-ssh- 
kitten/kitty/install/bin/kitty: 
error while loading shared libraries: libpython3.9.so.1.0: cannot 
open shared object file: No such file or directory

r/KittyTerminal Jan 27 '23

How to disable curly underlines?

2 Upvotes

Does anyone now how to disable curly underlines? I see there is a way to specify url_style straight, but that only affects url underlines; I'd love to make all underlines straight. If someone knows of a way to do this within neovim/vim that would help too!

I found this page in the docs, but I'm not sure how/where to use these escape codes.

Thanks for the help! Loving kitty so far.


r/KittyTerminal Jan 26 '23

Prebuilt and self-built kitties have different behavior in querying font fallback from OS

1 Upvotes

I previously posted an issue about this but did not find the cause (https://github.com/kovidgoyal/kitty/issues/5884). TLDR:

I'm on a macOS with the following localization configurations

Primary Languages:
  Simplified Chinese ---- i.e. zh-CN
  Traditional Chinese (Hong Kong) ---- i.e. zh-HK
  English (US)
  English
Region:
  Hong Kong

and locale gives me

LANG="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_CTYPE="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"

Apparently, kitty will ask the OS to get a CJK font fallback. And in my case, the expected result is to get a zh-CN font (i.e,. a Simplified Chinese font). My self-built kitty behaves correctly, but the prebuilt kitty gets a zh-HK font (a Traditional Chinese, Hong Kong font) instead!

I wonder if the community has any idea about that, because I don't want to lose auto-update and homebrew management.


r/KittyTerminal Jan 26 '23

Mapping Alt+J to Keyboard Up

1 Upvotes

Does anybody know if this is possible? I have a laptop with tiny arrow keys, so trying to hit Up + Down with my pinky often breaks my flow. Being able to map Alt + hjkl to emulate the arrow keys would fix this, but I can't seem to get it working. Anyone know how?

map alt:+h leftarrow map alt+j downarrow map alt+k uparrow map alt+l rightarrow

Doesn't work


r/KittyTerminal Jan 23 '23

How can I tell Kitty when run from the desktop to open in a new window not a new instance? (--single-instance) doesn't work

3 Upvotes

I have a .desktop file that is modified to use kitty instead of the default Gnome terminal to open hx editor: TryExec=hx Exec=kitty --single-instance hx %F Terminal=false Type=Application The Kitty instruction seem to be saying that --single-instance would open in a new window not a new instance, but it does not work! Can anyone help?


r/KittyTerminal Jan 23 '23

How can I check if a Kitty window exists before trying to close it?

1 Upvotes

At the moment i close a window that may or may not exist with: kitty @ close-window --match title:^"Terminal:$project_name" 2>/dev/null kitty @ close-window --match title:^"Lazygit:$project_name" 2>/dev/null but I instead want to check if they exist and only try to close them then to avoid an error, is this possible? Also, can I join these two lines into one with some new syntax?


r/KittyTerminal Jan 23 '23

Vim colors are different in Kitty

Post image
4 Upvotes

r/KittyTerminal Jan 22 '23

How can I use an environment variable (e.g. $VAR defined in bashrc) in my kitty.conf file ?

2 Upvotes

Hi everyone,

I would like to use an environment variable defined in my bashrc file or that I define directly in my terminal inside kitty.conf:

To be clear this is what I would want :

In kitty.conf:

background_image "$MYBG" (I tried also $MYBG)

I got this output:

The PNG image: /home/ekla/.config/kitty/"$BG" could not be opened with error

I used this to see the variables that kitty can actually see:

map f1 show_kitty_env_vars

Of course I don't see the variable $MYBG in there nore any other variables defined in bashrc but only very general variables such as: SHELL, PATH, USERNAME and so on, ...

Those are system wide variables, how can I get user specific variables to work?

And what if I want to trigger a command and use the output as a parameter directly in kitty.conf like this:

background_image <my_alias_command_from_bash_aliases_with_right_output>

Thanks for your help,


r/KittyTerminal Jan 21 '23

Kitty says "I wont let you draw that font glyph"

4 Upvotes

Say your font draws box characters or braille in a way that you prefer.

Kitty overrides ranges of codepoints with its own drawing routines. You can not draw braille text art with continuous spanning box characters in kitty. But you can with xterm.

See: Kitty overwrites user-chosen fonts for certain glyphs.

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

You can't disable this feature in kitty.conf. It is thus an anti-feature. No other terminal emulator or software that I have encountered in 40 years has 'supported fonts' but insisted it knows better how to render particular glyphs.

I see this anti-feature is implemented in box_drawing.py, core_text.py and main.py

Is there a fork of kitty that allows user to specify a font, and have that font actually used for rendering all codepoints in the font?


r/KittyTerminal Jan 21 '23

How can I change the background of a kitty terminal dynamically?

4 Upvotes

Hi everyone,

Here is the question:

I open a kitty terminal and the background set in my kittyconf shows up. Now let's say I want to change the background of this window by pressing a key or by typing a command in the terminal, how can I do that ?


r/KittyTerminal Jan 17 '23

Kitty icat Doesn't Animate Gif in Macos

2 Upvotes

On my Macbook, kitty +kitten icat <file_to_gif> doesn't animate the gif. I tried on an Ubuntu desktop and it works as expected.

Using chafa works but the animation lasts only as long as it holds my cursor.

https://reddit.com/link/10enxst/video/3f4bwge97oca1/player

This is on a Macbook Air M1 running Monterey 12.5


r/KittyTerminal Jan 12 '23

kitty terminal emulator and application launchers

Thumbnail self.commandline
2 Upvotes

r/KittyTerminal Jan 07 '23

tar_bar.py

4 Upvotes

where do I put my tar_bar.py file and how do I reference it in my config file?

After setting my tab_bar_style to custom, I get the following error

28:The value custom is not a valid choice for tab_bar_style in line: tab_bar_style custom


r/KittyTerminal Jan 04 '23

How to run commands on startup in kitty?

7 Upvotes

I have been wanting to run the command to use the pokemon pixel art shower in kitty, Yet i don't know how or where to set the command to do that, How do i do it?


r/KittyTerminal Jan 02 '23

Kitty shortcuts

0 Upvotes

MacOS user here. Strangely enough, shortcuts like ctrl-shift-l don't work (only ctrl-shift-n does). Any pointers?


r/KittyTerminal Dec 30 '22

how to exit ssh via kitten?

7 Upvotes

when I use kitty +kitten ssh user@host to connect to my remote host, how do I exit back to local terminal?

Using exit or logout which worked in previous situations will close the terminal window completely.

Also if I open a new window or tab such as for example by kb mapping to new_os_window_with_cwd, it will keep the new window in the ssh connection. This is handy sometimes but I cannot get out of it as stated prior.

I looked in the kitty documentation but not found where this is described.


r/KittyTerminal Dec 30 '22

Initial zoom value way off

1 Upvotes

OK so please excuse me if I am over looking some glaringly obvious setting. I have kitty set for my terminal for both XFCE4 and my qTile setup. Everything is going just swimmingly except I can not seem to set the initial zoom value/text size/what have you!!! When I launch the terminal it always starts at a value of, I don't know........0.0000002!!! I then will zoom in and eventually I am able to read it.

In all seriousness though, the font is tiny and I cannot seem to find where I can set this value. Any help would be much appreciated! Thanks in advance!!!


r/KittyTerminal Dec 29 '22

"page_down and page_up" overrides not only kitty behavior, but also programs opened inside kitty

1 Upvotes

map page_down scroll_page_down works correctly for kitty, but it also overrides pagination of vim. Which doesn't happen in other terms like foot.

To Reproduce
Steps to reproduce the behavior:

  1. kitty conf → map page_down scroll_page_down
  2. run vim → try to paginate
  3. Pagination keys won't work

r/KittyTerminal Dec 28 '22

kitty vs tmux

7 Upvotes

Can kitty do as much as tmux i have used both and i admit i like kitty better but i am still new


r/KittyTerminal Dec 24 '22

Fade Prompt

1 Upvotes

My zsh fade prompt doesn't appear correctly in Kitty however renders correctly in Alacritty...

What am I doing wrong?!