adelarsq / image_preview.nvim

Image Preview for Neovim 🖼
MIT License
138 stars 8 forks source link

[Kitty] Error: open /dev/tty: no such device or address #11

Open ogios opened 2 months ago

ogios commented 2 months ago

running it directly result in nothing, so i check the code and get the command:

:!kitten @ launch --type=window kitten icat --hold '/home/ogios/.config/eww/ava.jpg'
Error: open /dev/tty: no such device or address
shell returned 1

i run it in kitty terminal bash shell, it worked, but run it in nvim doesn't what should i do?

vaaako commented 2 months ago

you need to enable "remote control" (the error message for some reason doesn't show up on neovim) you can achieve this by either editing kitty.conf or adding kitty -o allow_remote_control=true to your command for example, the command you sent, becomes: kitty -o allow_remote_control=true kitten @ launch --type=window kitten icat --hold '/home/ogios/.config/eww/ava.jpg'

now, you have three options:

ogios commented 2 months ago

i've set allow_remote_control yes in kitty.conf but can not open image in current kitty window using !kitten @ launch --type=window kitten icat --hold '/home/ogios/.config/eww/ava.jpg', i have to open another kitty window !kitty kitten @ launch --type=window kitten icat --hold '/home/ogios/.config/eww/ava.jpg'

vaaako commented 2 months ago

did you try adding kitty -o allow_remote_control=true on vim?