mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-06-20 18:08:02 +02: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.
|
terminal's built-in method of previewing images.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
.B forcekittyanim
|
||||||
|
Always use
|
||||||
|
.I Kitty
|
||||||
|
terminal's built-in method of previewing images for animated
|
||||||
|
images.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
.B forcechafa
|
.B forcechafa
|
||||||
Always use
|
Always use
|
||||||
.I Chafa
|
.I Chafa
|
||||||
|
@ -32,6 +32,7 @@ set_image_method() {
|
|||||||
image_method=
|
image_method=
|
||||||
|
|
||||||
[ -n "$forcekitty" ] && is_kitty && { image_method="$image_method_kitty"; return 0; }
|
[ -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 "$forcechafa" ] && exists chafa && { image_method="$image_method_chafa"; return 0; }
|
||||||
|
|
||||||
[ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && exists ueberzug &&
|
[ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && exists ueberzug &&
|
||||||
|
@ -47,6 +47,7 @@ static VectorPreview *previews;
|
|||||||
|
|
||||||
static struct Option options[] = {
|
static struct Option options[] = {
|
||||||
DEF_OPTION_BOOL(forcekitty),
|
DEF_OPTION_BOOL(forcekitty),
|
||||||
|
DEF_OPTION_BOOL(forcekittyanim),
|
||||||
DEF_OPTION_BOOL(forcechafa),
|
DEF_OPTION_BOOL(forcechafa),
|
||||||
DEF_OPTION_BOOL(noimages),
|
DEF_OPTION_BOOL(noimages),
|
||||||
DEF_OPTION_BOOL(nosymlinkinfo),
|
DEF_OPTION_BOOL(nosymlinkinfo),
|
||||||
|
@ -14,7 +14,7 @@ struct CTPV {
|
|||||||
} mode;
|
} mode;
|
||||||
char *server_id_s;
|
char *server_id_s;
|
||||||
struct {
|
struct {
|
||||||
int forcekitty, forcechafa, noimages, nosymlinkinfo;
|
int forcekitty, forcekittyanim, forcechafa, noimages, nosymlinkinfo;
|
||||||
} opts;
|
} 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,
|
int run_script(char *script, size_t script_len, int *exitcode, int *signal,
|
||||||
SpawnProg sp, void *sp_arg)
|
SpawnProg sp, void *sp_arg)
|
||||||
{
|
{
|
||||||
OPT_SETENV(forcechafa);
|
|
||||||
OPT_SETENV(forcekitty);
|
OPT_SETENV(forcekitty);
|
||||||
|
OPT_SETENV(forcekittyanim);
|
||||||
|
OPT_SETENV(forcechafa);
|
||||||
OPT_SETENV(noimages);
|
OPT_SETENV(noimages);
|
||||||
OPT_SETENV(nosymlinkinfo);
|
OPT_SETENV(nosymlinkinfo);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user