mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Global: make FFinstance instance a global variable
As discussed in https://github.com/fastfetch-cli/fastfetch/discussions/473
This commit is contained in:
@@ -5,6 +5,6 @@
|
||||
|
||||
#include "fastfetch.h"
|
||||
|
||||
const char* ffDetectTheme(const FFinstance* instance, FFstrbuf* result);
|
||||
const char* ffDetectTheme(FFstrbuf* result);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
#include "detection/gtk_qt/gtk_qt.h"
|
||||
#include "detection/displayserver/displayserver.h"
|
||||
|
||||
const char* ffDetectTheme(const FFinstance* instance, FFstrbuf* result)
|
||||
const char* ffDetectTheme(FFstrbuf* result)
|
||||
{
|
||||
const FFDisplayServerResult* wmde = ffConnectDisplayServer(instance);
|
||||
const FFDisplayServerResult* wmde = ffConnectDisplayServer();
|
||||
|
||||
if(ffStrbufIgnCaseCompS(&wmde->wmProtocolName, FF_WM_PROTOCOL_TTY) == 0)
|
||||
return "Theme isn't supported in TTY";
|
||||
|
||||
const FFQtResult* plasma = ffDetectQt(instance);
|
||||
const FFstrbuf* gtk2 = &ffDetectGTK2(instance)->theme;
|
||||
const FFstrbuf* gtk3 = &ffDetectGTK3(instance)->theme;
|
||||
const FFstrbuf* gtk4 = &ffDetectGTK4(instance)->theme;
|
||||
const FFQtResult* plasma = ffDetectQt();
|
||||
const FFstrbuf* gtk2 = &ffDetectGTK2()->theme;
|
||||
const FFstrbuf* gtk3 = &ffDetectGTK3()->theme;
|
||||
const FFstrbuf* gtk4 = &ffDetectGTK4()->theme;
|
||||
|
||||
if(plasma->widgetStyle.length == 0 && plasma->colorScheme.length == 0 && gtk2->length == 0 && gtk3->length == 0 && gtk4->length == 0)
|
||||
return "No themes found";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "theme.h"
|
||||
|
||||
const char* ffDetectTheme(FF_MAYBE_UNUSED const FFinstance* instance, FF_MAYBE_UNUSED FFstrbuf* result)
|
||||
const char* ffDetectTheme(FF_MAYBE_UNUSED FFstrbuf* result)
|
||||
{
|
||||
return "Not supported on this platform";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user