diff --git a/CMakeLists.txt b/CMakeLists.txt index a38f812a98..2fa35e944a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/configtool/configtool.c b/src/configtool/configtool.c new file mode 100644 index 0000000000..3b5322f5e9 --- /dev/null +++ b/src/configtool/configtool.c @@ -0,0 +1,7 @@ +#include "configtool.h" + +int runConfigTool(FFdata* data) +{ + fprintf(stdout, "config tool is not implemented yet\n"); + return 0; +} \ No newline at end of file diff --git a/src/configtool/configtool.h b/src/configtool/configtool.h new file mode 100644 index 0000000000..e5f0ccfc5b --- /dev/null +++ b/src/configtool/configtool.h @@ -0,0 +1,5 @@ +#pragma once + +#include "common/ffdata.h" + +int runConfigTool(FFdata* data); \ No newline at end of file diff --git a/src/fastfetch.c b/src/fastfetch.c index 3146cefba7..1ee88be37f 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -10,6 +10,7 @@ #include "common/strutil.h" #include "common/mallocHelper.h" #include "fastfetch_datatext.h" +#include "configtool/configtool.h" #include #include @@ -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")) {