mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2025-02-01 11:39:12 +01:00
Add chafasixel option
This commit is contained in:
parent
df6a273505
commit
f1f649fd9c
@ -19,7 +19,11 @@ noimages() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
autochafa() {
|
autochafa() {
|
||||||
[ -z "$autochafa" ]
|
[ -n "$autochafa" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
chafasixel() {
|
||||||
|
[ -n "$chafasixel" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
is_kitty() {
|
is_kitty() {
|
||||||
@ -67,7 +71,9 @@ is_anim_image() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
chafa_run() {
|
chafa_run() {
|
||||||
autochafa && format='-f symbols' || format=
|
format='-f symbols'
|
||||||
|
autochafa && format=
|
||||||
|
chafasixel && format='-f sixels'
|
||||||
chafa -s "${w}x${h}" $format "$1" | sed 's/#/\n#/g'
|
chafa -s "${w}x${h}" $format "$1" | sed 's/#/\n#/g'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ static struct Option options[] = {
|
|||||||
DEF_OPTION_BOOL(noimages),
|
DEF_OPTION_BOOL(noimages),
|
||||||
DEF_OPTION_BOOL(nosymlinkinfo),
|
DEF_OPTION_BOOL(nosymlinkinfo),
|
||||||
DEF_OPTION_BOOL(autochafa),
|
DEF_OPTION_BOOL(autochafa),
|
||||||
|
DEF_OPTION_BOOL(chafasixel),
|
||||||
DEF_OPTION_BOOL(showgpg),
|
DEF_OPTION_BOOL(showgpg),
|
||||||
DEF_OPTION_STR(shell),
|
DEF_OPTION_STR(shell),
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@ struct CTPV {
|
|||||||
char *server_id_s;
|
char *server_id_s;
|
||||||
struct {
|
struct {
|
||||||
int forcekitty, forcekittyanim, forcechafa, noimages, nosymlinkinfo;
|
int forcekitty, forcekittyanim, forcechafa, noimages, nosymlinkinfo;
|
||||||
int autochafa, showgpg;
|
int autochafa, chafasixel, showgpg;
|
||||||
char *shell;
|
char *shell;
|
||||||
} opts;
|
} opts;
|
||||||
};
|
};
|
||||||
|
@ -46,6 +46,7 @@ RESULT run_script(char *script, size_t script_len, int *exitcode, int *signal,
|
|||||||
OPT_SETENV_INT(noimages);
|
OPT_SETENV_INT(noimages);
|
||||||
OPT_SETENV_INT(nosymlinkinfo);
|
OPT_SETENV_INT(nosymlinkinfo);
|
||||||
OPT_SETENV_INT(autochafa);
|
OPT_SETENV_INT(autochafa);
|
||||||
|
OPT_SETENV_INT(chafasixel);
|
||||||
OPT_SETENV_INT(showgpg);
|
OPT_SETENV_INT(showgpg);
|
||||||
OPT_SETENV_STR(shell);
|
OPT_SETENV_STR(shell);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user