mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-11-28 07:23:07 +01:00
Add forcekittyanim option
This commit is contained in:
parent
10f54e0dd5
commit
78dd61e73b
@ -270,6 +270,13 @@ Always use
|
||||
terminal's built-in method of previewing images.
|
||||
.
|
||||
.TP
|
||||
.B forcekittyanim
|
||||
Always use
|
||||
.I Kitty
|
||||
terminal's built-in method of previewing images for animated
|
||||
images.
|
||||
.
|
||||
.TP
|
||||
.B forcechafa
|
||||
Always use
|
||||
.I Chafa
|
||||
|
@ -32,6 +32,7 @@ set_image_method() {
|
||||
image_method=
|
||||
|
||||
[ -n "$forcekitty" ] && is_kitty && { image_method="$image_method_kitty"; return 0; }
|
||||
[ -n "$forcekittyanim" ] && is_kitty && is_anim_image && { image_method="$image_method_kitty"; return 0; }
|
||||
[ -n "$forcechafa" ] && exists chafa && { image_method="$image_method_chafa"; return 0; }
|
||||
|
||||
[ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && exists ueberzug &&
|
||||
|
@ -47,6 +47,7 @@ static VectorPreview *previews;
|
||||
|
||||
static struct Option options[] = {
|
||||
DEF_OPTION_BOOL(forcekitty),
|
||||
DEF_OPTION_BOOL(forcekittyanim),
|
||||
DEF_OPTION_BOOL(forcechafa),
|
||||
DEF_OPTION_BOOL(noimages),
|
||||
DEF_OPTION_BOOL(nosymlinkinfo),
|
||||
|
@ -14,7 +14,7 @@ struct CTPV {
|
||||
} mode;
|
||||
char *server_id_s;
|
||||
struct {
|
||||
int forcekitty, forcechafa, noimages, nosymlinkinfo;
|
||||
int forcekitty, forcekittyanim, forcechafa, noimages, nosymlinkinfo;
|
||||
} opts;
|
||||
};
|
||||
|
||||
|
@ -37,8 +37,9 @@ static char *prepend_helpers(char *str, size_t len)
|
||||
int run_script(char *script, size_t script_len, int *exitcode, int *signal,
|
||||
SpawnProg sp, void *sp_arg)
|
||||
{
|
||||
OPT_SETENV(forcechafa);
|
||||
OPT_SETENV(forcekitty);
|
||||
OPT_SETENV(forcekittyanim);
|
||||
OPT_SETENV(forcechafa);
|
||||
OPT_SETENV(noimages);
|
||||
OPT_SETENV(nosymlinkinfo);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user