mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-27 23:13:07 +01:00
Update docs
This commit is contained in:
parent
f1f649fd9c
commit
10ea66d996
66
README.md
66
README.md
@ -6,41 +6,33 @@ File previewer for a terminal
|
||||
|
||||
----
|
||||
|
||||
ctpv is a file previewer utility for terminals.
|
||||
ctpv is a file previewer utility for a terminal.
|
||||
|
||||
It supports previews for source code, archives, PDF files, images
|
||||
and videos (see [Previews](#previews)).
|
||||
It was made with integration into [lf file manager][lf] in mind,
|
||||
but I believe that it can be easily integrated into other programs
|
||||
as well.
|
||||
|
||||
Image previews are powered by one of these:
|
||||
It supports previews for source code, archives, PDF files, images,
|
||||
videos, etc.
|
||||
See [Previews](#previews) for more info.
|
||||
|
||||
Image previews are powered by one of these programs:
|
||||
|
||||
* [Überzug][ueberzug] (X11 only)
|
||||
* [Chafa][chafa] (X11 and Wayland)
|
||||
* [Kitty terminal][kitty]
|
||||
* [Chafa][chafa]
|
||||
|
||||
ctpv is a remake of an awesome program named
|
||||
[stpv](https://github.com/Naheel-Azawy/stpv)
|
||||
written in C.
|
||||
stpv worked perfectly for me, except it was kinda sluggish because
|
||||
[stpv](https://github.com/Naheel-Azawy/stpv).
|
||||
stpv did everything I wanted, except it was a bit sluggish because
|
||||
it was written in POSIX shell.
|
||||
ctpv is an attempt to make a faster version of stpv and add some
|
||||
new features.
|
||||
ctpv is written in C and is an attempt to make a faster version of
|
||||
stpv with a few new features.
|
||||
|
||||
Originally it was made for [lf]
|
||||
file manager but I believe that it can be easily integrated into
|
||||
other programs as well
|
||||
(either via configuration file like in lf or a simple wrapper
|
||||
script).
|
||||
## Previews
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Libraries
|
||||
|
||||
* `libcrypto`
|
||||
* `libmagic`
|
||||
|
||||
### Previews
|
||||
|
||||
Previewing each file type requires specific programs.
|
||||
Previewing each file type requires specific programs installed on
|
||||
a system.
|
||||
If a program is not found on the system, ctpv
|
||||
will try to use another one.
|
||||
Only one program is required for each file type.
|
||||
@ -75,13 +67,27 @@ For example, you only need either `elinks`, `lynx` or
|
||||
|
||||
### Manual
|
||||
|
||||
```sh
|
||||
If you are building from source, make sure to install these libraries!
|
||||
Depending on your system, you probably will also need "devel" versions
|
||||
of the same libraries.
|
||||
|
||||
* `libcrypto`
|
||||
* `libmagic`
|
||||
|
||||
Install:
|
||||
|
||||
```console
|
||||
git clone https://github.com/NikitaIvanovV/ctpv
|
||||
cd ctpv
|
||||
sudo make install
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Uninstall with `sudo make uninstall`
|
||||
Uninstall:
|
||||
|
||||
```console
|
||||
sudo make uninstall
|
||||
```
|
||||
|
||||
### AUR
|
||||
|
||||
@ -89,7 +95,7 @@ If you are an Arch Linux user, you can install
|
||||
[`ctpv-git`](https://aur.archlinux.org/packages/ctpv-git)
|
||||
AUR package.
|
||||
|
||||
```sh
|
||||
```console
|
||||
yay -S ctpv-git
|
||||
```
|
||||
|
||||
@ -113,7 +119,7 @@ If you use Wayland, follow these steps:
|
||||
|
||||
* Install [this fork of lf][lf-sixel]
|
||||
* Install [Chafa][chafa]
|
||||
* Add `set autochafa` to `~/.config/ctpv/config`
|
||||
* Add `set chafasixel` to `~/.config/ctpv/config`
|
||||
|
||||
As of 2023-03-19, original lf does not support sixel protocol,
|
||||
which is why you need use the fork.
|
||||
@ -122,7 +128,7 @@ which is why you need use the fork.
|
||||
|
||||
Full documentation on command line options,
|
||||
configuration and how to define custom previews can be found here:
|
||||
https://nikitaivanovv.github.io/ctpv
|
||||
<https://www.nikitaivanov.com/man1/ctpv>
|
||||
|
||||
[ueberzug]: https://github.com/seebye/ueberzug
|
||||
[kitty]: https://github.com/kovidgoyal/kitty
|
||||
|
58
doc/ctpv.1
58
doc/ctpv.1
@ -172,13 +172,35 @@ options (see
|
||||
.IR "Preview options" ).
|
||||
.
|
||||
.PP
|
||||
Note that
|
||||
.I \*(ub
|
||||
supports
|
||||
.I X11
|
||||
only
|
||||
.RI ( Wayland
|
||||
is not supported).
|
||||
only, so
|
||||
.I Wayland
|
||||
is not supported.
|
||||
To enable high-resolution image previews on
|
||||
.IR Wayland ,
|
||||
you need to follow these steps:
|
||||
.
|
||||
.IP \(bu 4
|
||||
Install
|
||||
.UR https://\:github\:.com/\:horriblename/\:lf
|
||||
.I lf-sixel
|
||||
.UE .
|
||||
.
|
||||
.IP \(bu
|
||||
Install
|
||||
.I Chafa
|
||||
.
|
||||
.IP \(bu
|
||||
Add
|
||||
.B chafasixel
|
||||
configuration option (see
|
||||
.IR "Preview options" )
|
||||
.
|
||||
.PP
|
||||
The fork is required because, as of 2023-03-19,
|
||||
the original lf does not support sixel protocol.
|
||||
.
|
||||
.SS How previews are selected
|
||||
.
|
||||
@ -290,7 +312,7 @@ command.
|
||||
.
|
||||
.TP
|
||||
.BR shell \~\c
|
||||
.I path
|
||||
.RI \(dq path \(dq
|
||||
Use
|
||||
.I path
|
||||
as a path to a shell to run previews with.
|
||||
@ -326,28 +348,12 @@ Print only text and do not use any image previewing method.
|
||||
Do not print resolved path of symbolic links.
|
||||
.
|
||||
.TP
|
||||
.B autochafa
|
||||
By default,
|
||||
.B chafasixel
|
||||
Set output format of
|
||||
.I Chafa
|
||||
is always forced to use \(lqsymbols\(rq format because
|
||||
.I lf
|
||||
does not support
|
||||
\(lqsixel\(rq output in the preview window.
|
||||
However, one could install a
|
||||
.UR https://github.com/horriblename/lf
|
||||
fork of
|
||||
.I lf
|
||||
.UE
|
||||
that does.
|
||||
For such cases the
|
||||
.B autochafa
|
||||
option exists, which allows
|
||||
.I Chafa
|
||||
to decide which format to use.
|
||||
Use it if you are sure that the version of
|
||||
.I lf
|
||||
you are using will be able to handle whatever output produced by
|
||||
.IR Chafa .
|
||||
to \(lqsixels\(rq instead of \(lqsymbols\(rq.
|
||||
Use it if your file manager and terminal are capable of properly displaying
|
||||
sixel data.
|
||||
.
|
||||
.TP
|
||||
.B showgpg
|
||||
|
Loading…
Reference in New Issue
Block a user