mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 07:44:06 +01:00
@@ -14,7 +14,7 @@ bool ffPrintCursor(FFCursorOptions* options) {
|
||||
ffDetectCursor(&result);
|
||||
|
||||
if (result.error.length) {
|
||||
ffPrintError(FF_CURSOR_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "%s", result.error.chars);
|
||||
ffPrintError(FF_MODULE_GET_DISPLAY_NAME(Cursor), 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "%s", result.error.chars);
|
||||
} else {
|
||||
ffStrbufRemoveIgnCaseEndS(&result.theme, "cursors");
|
||||
ffStrbufRemoveIgnCaseEndS(&result.theme, "cursor");
|
||||
@@ -25,7 +25,7 @@ bool ffPrintCursor(FFCursorOptions* options) {
|
||||
}
|
||||
|
||||
if (options->moduleArgs.outputFormat.length == 0) {
|
||||
ffPrintLogoAndKey(FF_CURSOR_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
|
||||
ffPrintLogoAndKey(FF_MODULE_GET_DISPLAY_NAME(Cursor), 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
|
||||
ffStrbufWriteTo(&result.theme, stdout);
|
||||
|
||||
if (result.size.length > 0 && !ffStrbufEqualS(&result.size, "0")) {
|
||||
@@ -34,7 +34,7 @@ bool ffPrintCursor(FFCursorOptions* options) {
|
||||
|
||||
putchar('\n');
|
||||
} else {
|
||||
FF_PRINT_FORMAT_CHECKED(FF_CURSOR_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {
|
||||
FF_PRINT_FORMAT_CHECKED(FF_MODULE_GET_DISPLAY_NAME(Cursor), 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {
|
||||
FF_ARG(result.theme, "theme"),
|
||||
FF_ARG(result.size, "size"),
|
||||
}));
|
||||
@@ -58,7 +58,7 @@ void ffParseCursorJsonObject(FFCursorOptions* options, yyjson_val* module) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ffPrintError(FF_CURSOR_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "Unknown JSON key %s", unsafe_yyjson_get_str(key));
|
||||
ffPrintError(FF_MODULE_GET_DISPLAY_NAME(Cursor), 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "Unknown JSON key %s", unsafe_yyjson_get_str(key));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ void ffDestroyCursorOptions(FFCursorOptions* options) {
|
||||
}
|
||||
|
||||
FFModuleBaseInfo ffCursorModuleInfo = {
|
||||
.name = FF_CURSOR_MODULE_NAME,
|
||||
.name = "Cursor",
|
||||
.description = "Print cursor style name",
|
||||
.displayName = {
|
||||
.en = "Cursor",
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "option.h"
|
||||
|
||||
#define FF_CURSOR_MODULE_NAME "Cursor"
|
||||
|
||||
bool ffPrintCursor(FFCursorOptions* options);
|
||||
void ffInitCursorOptions(FFCursorOptions* options);
|
||||
void ffDestroyCursorOptions(FFCursorOptions* options);
|
||||
|
||||
Reference in New Issue
Block a user