2022-07-26 18:06:30 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "fastfetch.h"
|
2025-08-04 14:25:14 +08:00
|
|
|
#include "modules/terminal/option.h"
|
|
|
|
|
#include "modules/shell/option.h"
|
2022-07-26 18:06:30 +02:00
|
|
|
|
2026-03-29 09:28:49 +08:00
|
|
|
typedef struct FFShellResult {
|
2024-01-12 20:42:33 +08:00
|
|
|
FFstrbuf processName;
|
2026-03-29 09:28:49 +08:00
|
|
|
FFstrbuf exe; // Actually arg0 in *nix
|
|
|
|
|
const char* exeName; // pointer to a char in exe
|
|
|
|
|
FFstrbuf exePath; // Full real path to executable file
|
2024-01-12 20:42:33 +08:00
|
|
|
FFstrbuf prettyName;
|
|
|
|
|
FFstrbuf version;
|
|
|
|
|
uint32_t pid;
|
|
|
|
|
uint32_t ppid;
|
2024-01-19 15:42:48 +08:00
|
|
|
int32_t tty;
|
2024-01-12 20:42:33 +08:00
|
|
|
} FFShellResult;
|
2022-07-26 18:06:30 +02:00
|
|
|
|
2026-03-29 09:28:49 +08:00
|
|
|
typedef struct FFTerminalResult {
|
2024-01-12 20:42:33 +08:00
|
|
|
FFstrbuf processName;
|
|
|
|
|
FFstrbuf exe;
|
|
|
|
|
FFstrbuf prettyName;
|
2026-03-29 09:28:49 +08:00
|
|
|
const char* exeName; // pointer to a char in exe
|
|
|
|
|
FFstrbuf exePath; // Full real path to executable file
|
2024-01-12 20:42:33 +08:00
|
|
|
FFstrbuf version;
|
2024-02-27 16:19:36 +08:00
|
|
|
FFstrbuf tty;
|
2024-01-12 20:42:33 +08:00
|
|
|
uint32_t pid;
|
|
|
|
|
uint32_t ppid;
|
|
|
|
|
} FFTerminalResult;
|
2022-07-26 18:06:30 +02:00
|
|
|
|
2024-01-12 20:42:33 +08:00
|
|
|
const FFShellResult* ffDetectShell();
|
|
|
|
|
const FFTerminalResult* ffDetectTerminal();
|