Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ set(LIBFASTFETCH_SRC
src/options/display.c
src/options/logo.c
src/options/general.c
src/configtool/configtool.c
)

if(LINUX)
Expand Down
7 changes: 7 additions & 0 deletions src/configtool/configtool.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "configtool.h"

int runConfigTool(FFdata* data)
{
fprintf(stdout, "config tool is not implemented yet\n");
return 0;
}
5 changes: 5 additions & 0 deletions src/configtool/configtool.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#include "common/ffdata.h"

int runConfigTool(FFdata* data);
6 changes: 6 additions & 0 deletions src/fastfetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "common/strutil.h"
#include "common/mallocHelper.h"
#include "fastfetch_datatext.h"
#include "configtool/configtool.h"

#include <stdlib.h>
#include <ctype.h>
Expand Down Expand Up @@ -654,6 +655,11 @@ static void parseCommand(FFdata* data, char* key, char* value) {
generateConfigFile(data, false, value, true);
} else if (ffStrEqualsIgnCase(key, "--gen-config-full-force")) {
generateConfigFile(data, true, value, true);
} else if (ffStrEqualsIgnCase(key, "--gen-config-tool")) {
generateConfigFile(data, false, value, false);
if (runConfigTool(data) != 0) {
exit(416);
}
} else if (ffStrEqualsIgnCase(key, "-c") || ffStrEqualsIgnCase(key, "--config")) {
optionParseConfigFile(data, key, value);
} else if (ffStrEqualsIgnCase(key, "-j") || ffStrEqualsIgnCase(key, "--json")) {
Expand Down