mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-02-17 11:00:47 +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
|
It was made with integration into [lf file manager][lf] in mind,
|
||||||
and videos (see [Previews](#previews)).
|
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)
|
* [Überzug][ueberzug] (X11 only)
|
||||||
|
* [Chafa][chafa] (X11 and Wayland)
|
||||||
* [Kitty terminal][kitty]
|
* [Kitty terminal][kitty]
|
||||||
* [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).
|
||||||
written in C.
|
stpv did everything I wanted, except it was a bit sluggish because
|
||||||
stpv worked perfectly for me, except it was kinda sluggish because
|
|
||||||
it was written in POSIX shell.
|
it was written in POSIX shell.
|
||||||
ctpv is an attempt to make a faster version of stpv and add some
|
ctpv is written in C and is an attempt to make a faster version of
|
||||||
new features.
|
stpv with a few new features.
|
||||||
|
|
||||||
Originally it was made for [lf]
|
## Previews
|
||||||
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).
|
|
||||||
|
|
||||||
## Dependencies
|
Previewing each file type requires specific programs installed on
|
||||||
|
a system.
|
||||||
### Libraries
|
|
||||||
|
|
||||||
* `libcrypto`
|
|
||||||
* `libmagic`
|
|
||||||
|
|
||||||
### Previews
|
|
||||||
|
|
||||||
Previewing each file type requires specific programs.
|
|
||||||
If a program is not found on the system, ctpv
|
If a program is not found on the system, ctpv
|
||||||
will try to use another one.
|
will try to use another one.
|
||||||
Only one program is required for each file type.
|
Only one program is required for each file type.
|
||||||
@ -75,13 +67,27 @@ For example, you only need either `elinks`, `lynx` or
|
|||||||
|
|
||||||
### Manual
|
### 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
|
git clone https://github.com/NikitaIvanovV/ctpv
|
||||||
cd ctpv
|
cd ctpv
|
||||||
sudo make install
|
sudo make install
|
||||||
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
Uninstall with `sudo make uninstall`
|
Uninstall:
|
||||||
|
|
||||||
|
```console
|
||||||
|
sudo make uninstall
|
||||||
|
```
|
||||||
|
|
||||||
### AUR
|
### AUR
|
||||||
|
|
||||||
@ -89,7 +95,7 @@ If you are an Arch Linux user, you can install
|
|||||||
[`ctpv-git`](https://aur.archlinux.org/packages/ctpv-git)
|
[`ctpv-git`](https://aur.archlinux.org/packages/ctpv-git)
|
||||||
AUR package.
|
AUR package.
|
||||||
|
|
||||||
```sh
|
```console
|
||||||
yay -S ctpv-git
|
yay -S ctpv-git
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -113,7 +119,7 @@ If you use Wayland, follow these steps:
|
|||||||
|
|
||||||
* Install [this fork of lf][lf-sixel]
|
* Install [this fork of lf][lf-sixel]
|
||||||
* Install [Chafa][chafa]
|
* 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,
|
As of 2023-03-19, original lf does not support sixel protocol,
|
||||||
which is why you need use the fork.
|
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,
|
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://www.nikitaivanov.com/man1/ctpv>
|
||||||
|
|
||||||
[ueberzug]: https://github.com/seebye/ueberzug
|
[ueberzug]: https://github.com/seebye/ueberzug
|
||||||
[kitty]: https://github.com/kovidgoyal/kitty
|
[kitty]: https://github.com/kovidgoyal/kitty
|
||||||
|
58
doc/ctpv.1
58
doc/ctpv.1
@ -172,13 +172,35 @@ options (see
|
|||||||
.IR "Preview options" ).
|
.IR "Preview options" ).
|
||||||
.
|
.
|
||||||
.PP
|
.PP
|
||||||
Note that
|
|
||||||
.I \*(ub
|
.I \*(ub
|
||||||
supports
|
supports
|
||||||
.I X11
|
.I X11
|
||||||
only
|
only, so
|
||||||
.RI ( Wayland
|
.I Wayland
|
||||||
is not supported).
|
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
|
.SS How previews are selected
|
||||||
.
|
.
|
||||||
@ -290,7 +312,7 @@ command.
|
|||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.BR shell \~\c
|
.BR shell \~\c
|
||||||
.I path
|
.RI \(dq path \(dq
|
||||||
Use
|
Use
|
||||||
.I path
|
.I path
|
||||||
as a path to a shell to run previews with.
|
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.
|
Do not print resolved path of symbolic links.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B autochafa
|
.B chafasixel
|
||||||
By default,
|
Set output format of
|
||||||
.I Chafa
|
.I Chafa
|
||||||
is always forced to use \(lqsymbols\(rq format because
|
to \(lqsixels\(rq instead of \(lqsymbols\(rq.
|
||||||
.I lf
|
Use it if your file manager and terminal are capable of properly displaying
|
||||||
does not support
|
sixel data.
|
||||||
\(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 .
|
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.B showgpg
|
.B showgpg
|
||||||
|
Loading…
Reference in New Issue
Block a user