ohmu
·
2026-10-15
1#pragma once
2
3#include "fastfetch.h"
4#include "modules/terminal/option.h"
5#include "modules/shell/option.h"
6
7typedef struct FFShellResult {
8 FFstrbuf processName;
9 FFstrbuf exe; // Actually arg0 in *nix
10 const char* exeName; // pointer to a char in exe
11 FFstrbuf exePath; // Full real path to executable file
12 FFstrbuf prettyName;
13 FFstrbuf version;
14 uint32_t pid;
15 uint32_t ppid;
16 int32_t tty;
17} FFShellResult;
18
19typedef struct FFTerminalResult {
20 FFstrbuf processName;
21 FFstrbuf exe;
22 FFstrbuf prettyName;
23 const char* exeName; // pointer to a char in exe
24 FFstrbuf exePath; // Full real path to executable file
25 FFstrbuf version;
26 FFstrbuf tty;
27 uint32_t pid;
28 uint32_t ppid;
29} FFTerminalResult;
30
31const FFShellResult* ffDetectShell();
32const FFTerminalResult* ffDetectTerminal();
33
34bool fftsGetShellVersion(FFstrbuf* exe, const char* exeName, FFstrbuf* version);
35bool fftsGetTerminalVersion(FFstrbuf* processName, FFstrbuf* exe, FFstrbuf* version);