Update docs

Wayland images previews info
This commit is contained in:
Nikita Ivanov 2023-03-20 20:00:17 +01:00
parent 41507944c4
commit df6a273505
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
3 changed files with 24 additions and 8 deletions

View File

@ -1,21 +1,21 @@
# ctpv # ctpv
Terminal previewer File previewer for a terminal
![showcase](doc/showcase.gif) ![showcase](doc/showcase.gif)
---- ----
ctpv is a previewer utility for terminals. ctpv is a file previewer utility for terminals.
It supports previews for source code, archives, PDF files, images It supports previews for source code, archives, PDF files, images
and videos (see [Previews](#previews)). and videos (see [Previews](#previews)).
Image previews are powered by one of these: Image previews are powered by one of these:
* [Überzug](https://github.com/seebye/ueberzug) (X11 only) * [Überzug][ueberzug] (X11 only)
* [Kitty terminal](https://github.com/kovidgoyal/kitty) * [Kitty terminal][kitty]
* [Chafa](https://github.com/hpjansson/chafa) * [Chafa][chafa]
ctpv is a remake of an awesome program named ctpv is a remake of an awesome program named
[stpv](https://github.com/Naheel-Azawy/stpv) [stpv](https://github.com/Naheel-Azawy/stpv)
@ -61,7 +61,7 @@ For example, you only need either `elinks`, `lynx` or
| html | `elinks` `lynx` `w3m` | | html | `elinks` `lynx` `w3m` |
| image | `ueberzug` `chafa` | | image | `ueberzug` `chafa` |
| json | `jq` | | json | `jq` |
| markdown | `mdcat` | | markdown | `glow` `mdcat` |
| office | `libreoffice` | | office | `libreoffice` |
| pdf | `pdftoppm` | | pdf | `pdftoppm` |
| svg | `convert` | | svg | `convert` |
@ -107,10 +107,25 @@ set cleaner ctpvclear
&ctpvquit $id &ctpvquit $id
``` ```
#### Wayland
If you use Wayland, follow these steps:
* Install [this fork of lf][lf-sixel]
* Install [Chafa][chafa]
* Add `set autochafa` to `~/.config/ctpv/config`
As of 2023-03-19, original lf does not support sixel protocol,
which is why you need use the fork.
## Documentation ## Documentation
Full documentation on command line options, Full documentation on command line options,
configuration and how to define custom previews can be found here: configuration and how to define custom previews can be found here:
https://nikitaivanovv.github.io/ctpv/ https://nikitaivanovv.github.io/ctpv
[ueberzug]: https://github.com/seebye/ueberzug
[kitty]: https://github.com/kovidgoyal/kitty
[chafa]: https://github.com/hpjansson/chafa
[lf]: https://github.com/gokcehan/lf [lf]: https://github.com/gokcehan/lf
[lf-sixel]: https://github.com/horriblename/lf

View File

@ -103,7 +103,7 @@ json T{
jq jq
T} T}
markdown T{ markdown T{
mdcat glow mdcat
T} T}
office T{ office T{
libreoffice libreoffice

View File

@ -17,6 +17,7 @@ Preview b_previews[] = {
PR("md", NULL, NULL, glow, PREV_ATTR_NONE), PR("md", NULL, NULL, glow, PREV_ATTR_NONE),
PR("md", NULL, NULL, mdcat, PREV_ATTR_NONE), PR("md", NULL, NULL, mdcat, PREV_ATTR_NONE),
PR("torrent", NULL, NULL, torrent, PREV_ATTR_NONE), PR("torrent", NULL, NULL, torrent, PREV_ATTR_NONE),
PR("ods", NULL, NULL, libreoffice, PREV_ATTR_NONE), PR("ods", NULL, NULL, libreoffice, PREV_ATTR_NONE),