mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
Merge pull request #93 from CarterLi/wsl2
Better support devices running without desktop environment ( and WSL2 ), fix #83
This commit is contained in:
commit
0b3f96610b
@ -297,11 +297,8 @@ static void getSessionTypeFromEnv(FFWMDEResult* result)
|
||||
env = getenv("TERM");
|
||||
if(env != NULL && *env != '\0')
|
||||
{
|
||||
if(strcasecmp(env, "linux") == 0)
|
||||
{
|
||||
ffStrbufSetS(&result->wmProtocolName, "TTY");
|
||||
return;
|
||||
}
|
||||
ffStrbufSetS(&result->wmProtocolName, "TTY");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -442,6 +442,9 @@ static void waylandGlobalAddListener(void* data, struct wl_registry* registry, u
|
||||
|
||||
static bool printResolutionWaylandBackend(FFinstance* instance)
|
||||
{
|
||||
if(getenv("XDG_RUNTIME_DIR") == NULL)
|
||||
return false;
|
||||
|
||||
const char* sessionType = getenv("XDG_SESSION_TYPE");
|
||||
if(sessionType != NULL && strcasecmp(sessionType, "wayland") != 0)
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user