Doesn't work with Kitty terminal emulator
Closed this issue · 3 comments
Inside Kitty
shows: error: term graphics not available
.
$ ./fv /usr/share/fonts/cantarell/Cantarell-VF.otf
Usage:
fv [flags] <font1> [font2, ..., fontN]
Flags:
--all show all system fonts
--bg color background color (default white)
--dpi int dpi (default 100)
--fg color foreground color (default black)
-h, --help help for fv
--list list system fonts
--margin int margin (default 5)
--match match system fonts
--size int font size (default 48)
--style font-style font style (default regular)
--text string display text
--variant font-variant font variant (default normal)
-v, --version version for fv
error: term graphics not available
- If I do the same in xterm sixel mode:
xterm -ti vt340
, works as expected, showing image with font. - Maybe is the way you check for Kitty availability? right now my TERM variable is:
$ echo $TERM
screen-256color
System:
distro: Arch Linux x86_64
kernel: 6.6.22-1-lts
shell: bash 5.2.32
cpu: Intel i7-4790 (8) @ 3.600GHz
gpu: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
@Disonantemus you can try export TERM_GRAPHICS=kitty
-- let me know if that works for you. What OS / version of Kitty are you using? It works "out of the box" with the Kitty I have installed (also on Arch).
export TERM_GRAPHICS=kitty
- Doing that works as expected.
- I didn't know that I needed that, maybe is a good idea to mention it in README.md?
- I did search for "TERM_GRAPHICS=kitty" and "TERM_GRAPHICS", inside this repo, google and kitty man pages with not success.
- This fix same problem for iv-cli
$ pacman -Si kitty | head -3
Repository : extra
Name : kitty
Version : 0.35.2-1
Updated version from official extra arch repo.
Unfortunately, there is no automatic detection of kitty
at the moment, and you likely are overwriting the TERM
variable for use with other applications. That's the reason for the rasterm
library supporting TERM_GRAPHICS
. I just checked, and the default TERM
variable for kitty
is TERM=xterm-kitty
, which the rasterm
library (and thus fv
) will properly detect. Please use the TERM_GRAPHICS
environment variable. I am looking into doing better automated support of detecting kitty
and wezterm
terminals, but there is no realistic ETA on when that might be available. I'm closing this issue for now, as this is working "as designed" currently.