image previews
rovr uses the textual-image package to render images directly in the terminal.
however, image support depends on the capabilities of your terminal emulator. different terminals support different image protocols.
supported terminals
Section titled “supported terminals”here is a summary of terminals and their support for the image protocols used by rovr:
| Terminal | TGP support | Sixel support | iTerm2 support |
|---|---|---|---|
| Black Box | ❌ | ✅ | ❌ |
| Foot | ❌ | ✅ | ❌ |
| Gnome Terminal | ❌ | ❌ | ❌ |
| Iterm2 | ❌ | ✅ | ✅ |
| Kitty | ✅ | ❌ | ❌ |
| Konsole | ✅ | ✅ | ❌ |
| Tmux | ❌ | ✅ | ❌ |
| Visual Studio Code | ❌ | ✅ | ❌ |
| Warp | ❌ | ❌ | ❌ |
| Wezterm | ❌ | ✅ | ✅ |
| Windows Console | ❌ | ❌ | ❌ |
| Windows Terminal | ❌ | ✅ | ❌ |
| Xterm | ❌ | ✅ | ❌ |
rovr includes its own iTerm2 Inline Image Protocol widget. With
"Auto", it is selected automatically in a TTY whenTERM_PROGRAMisiTerm2orWezTerm.
configuring the image protocol
Section titled “configuring the image protocol”if you are using a terminal that doesn’t support the default image protocol, textual-image will fall back to a half-cell representation.
if images do not appear correctly, you can manually override the image protocol in your config.toml file.
[interface.image_viewer]protocol = "Auto"available protocol values are: "Auto", "TGP", "ITerm2", "Sixel", "Halfcell", and "Unicode".
configuring the image size
Section titled “configuring the image size”this lets you configure the maximum width and height of image previews in pixels. by default, rovr sets these values to 1920 (width) and 1080 (height).
[interface.image_viewer]# used for all imagesmax_size = [4000, 4000]
[interface.font_preview]# used for previewing fontsmax_size = [1000, 1000]font_size = 50image resampling
Section titled “image resampling”when resampling, sometimes the image can appear pixelated. to solve this, you can set the image resampling to a higher type
[interface.image_viewer]resampling = "nearest" # lowest quality, you see pixelsresampling = "box" # similar to nearestresampling = "bilinear" # recommended usuallyresampling = "hamming"resampling = "bicubic"resampling = "lanczos" # best quality, but most time