mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
README: document image logo support
This commit is contained in:
@@ -30,12 +30,18 @@ static FFstrbuf base64Encode(FFstrbuf* in)
|
||||
static bool printImageIterm(FFinstance* instance)
|
||||
{
|
||||
if(instance->config.logo.width == 0 || instance->config.logo.height == 0)
|
||||
{
|
||||
fputs("Logo: `item` protocol only works when both `--logo-width` and `--logo-height` being specified\n", stderr);
|
||||
return false;
|
||||
}
|
||||
|
||||
FFstrbuf buf;
|
||||
ffStrbufInit(&buf);
|
||||
if(!ffAppendFileBuffer(instance->config.logo.source.chars, &buf))
|
||||
{
|
||||
fputs("Logo: failed to load image file\n", stderr);
|
||||
return false;
|
||||
}
|
||||
|
||||
ffPrintCharTimes(' ', instance->config.logo.paddingLeft);
|
||||
FFstrbuf base64 = base64Encode(&buf);
|
||||
|
||||
Reference in New Issue
Block a user