blob: 008e30c4056c37431a787ddceeb02c511511362a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);
|