summaryrefslogtreecommitdiffstats
path: root/src/detection/terminalshell/terminalshell.h
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
committersumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
commit76424950e373d3b04ac3dd13019151bfba3e8423 (patch)
tree4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/detection/terminalshell/terminalshell.h
Add the files
Diffstat (limited to 'src/detection/terminalshell/terminalshell.h')
-rw-r--r--src/detection/terminalshell/terminalshell.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/detection/terminalshell/terminalshell.h b/src/detection/terminalshell/terminalshell.h
new file mode 100644
index 0000000..008e30c
--- /dev/null
+++ b/src/detection/terminalshell/terminalshell.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#include "fastfetch.h"
+#include "modules/terminal/option.h"
+#include "modules/shell/option.h"
+
+typedef struct FFShellResult {
+ FFstrbuf processName;
+ FFstrbuf exe; // Actually arg0 in *nix
+ const char* exeName; // pointer to a char in exe
+ FFstrbuf exePath; // Full real path to executable file
+ FFstrbuf prettyName;
+ FFstrbuf version;
+ uint32_t pid;
+ uint32_t ppid;
+ int32_t tty;
+} FFShellResult;
+
+typedef struct FFTerminalResult {
+ FFstrbuf processName;
+ FFstrbuf exe;
+ FFstrbuf prettyName;
+ const char* exeName; // pointer to a char in exe
+ FFstrbuf exePath; // Full real path to executable file
+ FFstrbuf version;
+ FFstrbuf tty;
+ uint32_t pid;
+ uint32_t ppid;
+} FFTerminalResult;
+
+const FFShellResult* ffDetectShell();
+const FFTerminalResult* ffDetectTerminal();
+
+bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version);
+bool fftsGetTerminalVersion(FFstrbuf* processName, FFstrbuf* exe, FFstrbuf* version);