Closed dostoievsky closed 2 years ago
Hi!
Please specify the kitty version you're using (kitty --version
in your terminal).
In your terminal, what is the output of kitty +kitten icat --print-window-size
?
For the mappings used to send code to the terminal please refer to the readme, by default simply press enter to send the current line, press enter while in visual mode to send the current visual selection, leader+space to send code within current section (i.e. between cell markers), etc.. If you already have other mappings for those keys or want to set different ones, you can do so in your vim config.
kitty 0.24.4 created by Kovid Goyal
> kitty +kitten icat --print-window-size
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/bin/../lib/kitty/__main__.py", line 185, in <module>
main()
File "/usr/bin/../lib/kitty/__main__.py", line 176, in main
namespaced(['+', first_arg[1:]] + sys.argv[2:])
File "/usr/bin/../lib/kitty/__main__.py", line 129, in namespaced
func(args[1:])
File "/usr/bin/../lib/kitty/__main__.py", line 112, in run_kitten
rk(kitten)
File "/usr/bin/../lib/kitty/kittens/runner.py", line 120, in run_kitten
runpy.run_module(f'kittens.{kitten}.main', run_name=run_name)
File "/usr/lib/python3.10/runpy.py", line 212, in run_module
return _run_code(code, {}, init_globals, run_name, mod_spec)
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/bin/../lib/kitty/kittens/icat/main.py", line 613, in <module>
main()
File "/usr/bin/../lib/kitty/kittens/icat/main.py", line 518, in main
ss = screen_size_function(tty)()
File "/usr/bin/../lib/kitty/kitty/utils.py", line 176, in __call__
self.ans = read_screen_size(self.fd)
File "/usr/bin/../lib/kitty/kitty/utils.py", line 156, in read_screen_size
if fd < 0:
TypeError: '<' not supported between instances of '_io.TextIOWrapper' and 'int'
I instaled kitty as an pacman package with -Syu.
This is an issue with kitty. Testing with version 0.24.4 I'm getting the same error. You might want to create an issue on the kitty repo for this. To get this plugin working, simply install an older version of kitty (e.g. 0.24.2) and it should work.
Thank you! I'll refer that issue on kitty repo. As you help me I am closing that issue.
Hey it worked!!!
I instaled kitty just for this, usualy I use alacritty with tmux, but, I read on kitty page that uses tmux with kitty is bad, how you've been doing to switch betwen panes?
I looked on web for how doing that but I didnt find nothing about how to configure kitty.
Can you tell me more about your setup? @luk400
Okay I just found something on web about:
https://sw.kovidgoyal.net/kitty/overview/
I'll leave here if newbs like me come around lol
Glad to hear it's working! You should find most of what you'll need here. But for reference, my config file ~/.config/kitty/kitty.conf
currently has, among some other highly specifc mappings for my workflow, the following (probably not super well thought out) mappings:
# use <alt> key as kitty_mod
kitty_mod alt
# close/create windows/tabs
map kitty_mod+enter new_window_with_cwd
map kitty_mod+q close_window
map kitty_mod+t new_tab_with_cwd
# move to next tab
map kitty_mod+space next_tab
# move between windows
map ctrl+j neighboring_window down
map ctrl+k neighboring_window up
map ctrl+h neighboring_window left
map ctrl+l neighboring_window right
# font size
map ctrl+plus change_font_size current +2.0
map ctrl+minus change_font_size current -2.0
# Clear the terminal screen by erasing all contents
map kitty_mod+backspace combine : clear_terminal clear active : send_text
# window resizing
map kitty_mod+< resize_window wider 3
map kitty_mod+shift+< resize_window narrower 3
map kitty_mod+plus resize_window taller 3
map kitty_mod+minus resize_window shorter 3
window_resize_step_cells 2
window_resize_step_lines 2
# moving windows around
map kitty_mod+k move_window up
map kitty_mod+h move_window left
map kitty_mod+l move_window right
map kitty_mod+j move_window down
# switch between layouts
map ctrl+, next_layout
# clipboard
map ctrl+shift+c copy_to_clipboard
map ctrl+shift+v paste_from_clipboard
# scrolling
map ctrl+shift+k scroll_page_up
map ctrl+shift+j scroll_page_down
map ctrl+shift+space scroll_end
I also have a file ~/.config/kitty/theme.conf
which I load at the end of kitty.conf with include ./theme.conf
, which contains the following:
background #1A1F36
foreground #ffffff
cursor #f0cb09
selection_background #18344f
color0 #000000
color8 #38fbdc
color1 #ff0000
color9 #92e117
color2 #37dd21
color10 #3bcf1d
color3 #fee409
color11 #ecc809
color4 #1460d2
color12 #5555ff
color5 #ff005d
color13 #ff55ff
color6 #00bbbb
color14 #6ae3f9
color7 #bbbbbb
color15 #ffffff
selection_foreground #122637
font_size 12
font_family JetBrains Mono Regular
background_opacity 0.9
cursor #ffffff
I am getting the following error when I try to render a graph with vim-jukit, can you help me solve this?
also, my %paste is not working! Idk if I configured wrong, but I get in line one and go to the last with shift+v and then press Y, when I hit enter it dosent work. How it realy work? I should press the bind key, select, then crtl+c, then enter?
but that shit is realy cool and will help me alot, thank you!!!!