Brightness: fix --brightness-format

This commit is contained in:
李通洲 2023-08-09 16:29:04 +08:00
parent 4b57e4261e
commit d8e221517b
No known key found for this signature in database
GPG Key ID: 269AD4F5325A22A3
3 changed files with 10 additions and 2 deletions

View File

@ -45,6 +45,7 @@ Bugfixes:
* Fix compatibility with Fig (Terminal, macOS)
* Fix option `--title-fqdn` doesn't work (Title)
* Fix used spaces calculation (Disk, Linux / BSD / macOS, #508)
* Fix `--brightness-format` (Brightness)
Logo:
* Change the special handling of `kitty` protocol with `.png` image file to a new image protocol `kitty-direct`. This is the fastest image protocol because fastfetch doesn't need to pre-encode the image to base64 or something and the image content doesn't need to be transmitted via tty. Note:

View File

@ -193,6 +193,13 @@ static inline void printCommandHelp(const char* command)
"Screen rotation"
);
}
else if(ffStrEqualsIgnCase(command, "brightness-format"))
{
constructAndPrintCommandHelpFormat("brightness", "{}", 2,
"Screen brightness",
"Screen name"
);
}
else if(ffStrEqualsIgnCase(command, "de-format"))
{
constructAndPrintCommandHelpFormat("de", "{2} {3}", 3,

View File

@ -64,8 +64,8 @@ void ffPrintBrightness(FFBrightnessOptions* options)
else
{
ffPrintFormatString(key.chars, 0, NULL, &options->moduleArgs.keyColor, &options->moduleArgs.outputFormat, FF_BRIGHTNESS_NUM_FORMAT_ARGS, (FFformatarg[]) {
{FF_FORMAT_ARG_TYPE_STRBUF, &item->value},
{FF_FORMAT_ARG_TYPE_FLOAT, &item->name}
{FF_FORMAT_ARG_TYPE_FLOAT, &item->value},
{FF_FORMAT_ARG_TYPE_STRBUF, &item->name},
});
}