Skip to content

Commit d81cd50

Browse files
authored
Shell (Linux): don't detect hyfetch as shell on NixOS (#1149)
On NixOS, Hyfetch has been placed in a "wrapper script" in order to set the correct PATH that it needs to run correctly. As a result, the actual Hyfetch executable has been renamed `.hyfetch-wrapped`, which results in this check failing to detect Hyfetch on NixOS properly. With this patch the logic has been changed to check if the program name contains the string `hyfetch`, which should work for the NixOS case.
1 parent 1101d2e commit d81cd50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/terminalshell/terminalshell_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static pid_t getShellInfo(FFShellResult* result, pid_t pid)
5050
ffStrbufEqualS(&result->processName, "perf") ||
5151
ffStrbufEqualS(&result->processName, "guake-wrapped") ||
5252
ffStrbufEqualS(&result->processName, "time") ||
53-
ffStrbufEqualS(&result->processName, "hyfetch") || //when hyfetch uses fastfetch as backend
53+
ffStrbufContainS(&result->processName, "hyfetch") || //when hyfetch uses fastfetch as backend
5454
ffStrbufEqualS(&result->processName, "clifm") || //https://github.com/leo-arch/clifm/issues/289
5555
ffStrbufEqualS(&result->processName, "valgrind") ||
5656
ffStrbufEqualS(&result->processName, "fastfetch") || //994

0 commit comments

Comments
 (0)