Refactor: move terminal/shell detection to own header

This commit is contained in:
Linus Dierheimer
2022-07-26 18:06:30 +02:00
parent 5c1aa20042
commit 0c81d3e894
12 changed files with 37 additions and 23 deletions
+2
View File
@@ -3,6 +3,8 @@
#ifndef FF_INCLUDED_detection_displayserver
#define FF_INCLUDED_detection_displayserver
#include "fastfetch.h"
typedef struct FFResolutionResult
{
uint32_t width;
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef FF_INCLUDED_detection_gtk
#define FF_INCLUDED_detection_gtk
#include "util/FFstrbuf.h"
#include "fastfetch.h"
typedef struct FFGTKResult
{
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef FF_INCLUDED_detection_os
#define FF_INCLUDED_detection_os
#include "util/FFstrbuf.h"
#include "fastfetch.h"
typedef struct FFOSResult
{
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef FF_INCLUDED_detection_qt
#define FF_INCLUDED_detection_qt
#include "util/FFstrbuf.h"
#include "fastfetch.h"
typedef struct FFQtResult
{
+1
View File
@@ -1,4 +1,5 @@
#include "fastfetch.h"
#include "detection/terminalshell.h"
#include "common/io.h"
#include "common/parsing.h"
#include "common/processing.h"
+26
View File
@@ -0,0 +1,26 @@
#pragma once
#ifndef FF_INCLUDED_detection_terminalshell
#define FF_INCLUDED_detection_terminalshell
#include "fastfetch.h"
typedef struct FFTerminalShellResult
{
FFstrbuf shellProcessName;
FFstrbuf shellExe;
const char* shellExeName; //pointer to a char in shellExe
FFstrbuf shellVersion;
FFstrbuf terminalProcessName;
FFstrbuf terminalExe;
const char* terminalExeName; //pointer to a char in terminalExe
FFstrbuf userShellExe;
const char* userShellExeName; //pointer to a char in userShellExe
FFstrbuf userShellVersion;
} FFTerminalShellResult;
const FFTerminalShellResult* ffDetectTerminalShell(FFinstance* instance);
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#ifndef FF_INCLUDED_detection_title
#define FF_INCLUDED_detection_title
#include "util/FFstrbuf.h"
#include "fastfetch.h"
typedef struct FFTitleResult
{