mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
Logo: disable image logos in ssh and tmux sessions
This commit is contained in:
parent
ef3b5df048
commit
71cba2451a
@ -1,6 +1,7 @@
|
||||
#include "image.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/printing.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
@ -839,6 +840,22 @@ bool ffLogoPrintImageIfExists(FFLogoType type, bool printError)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getenv("SSH_TTY"))
|
||||
{
|
||||
if(printError)
|
||||
fputs("Logo: Image logo is not supported in SSH sessions\n", stderr);
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* term = getenv("TERM");
|
||||
if((term && ffStrEquals(term, "screen")) || getenv("ZELLIJ") || getenv("TMUX"))
|
||||
{
|
||||
if(printError)
|
||||
fputs("Logo: Image logo is not supported in terminal multiplexers\n", stderr);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(type == FF_LOGO_TYPE_IMAGE_ITERM)
|
||||
return printImageIterm();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user