From 137039f86817b139536e256400a56174e1f454cd Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sat, 7 Jan 2023 22:37:01 +0100 Subject: [PATCH] Initialize brightness on wayland too --- src/detection/displayserver/linux/wayland.c | 1 + src/fastfetch.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/detection/displayserver/linux/wayland.c b/src/detection/displayserver/linux/wayland.c index 37891149c..0a0d695f4 100644 --- a/src/detection/displayserver/linux/wayland.c +++ b/src/detection/displayserver/linux/wayland.c @@ -66,6 +66,7 @@ static void waylandOutputModeListener(void* data, struct wl_output* output, uint result->width = (uint32_t) width; result->height = (uint32_t) height; result->refreshRate = ffdsParseRefreshRate(refreshRate / 1000); + result->brightness = -1; } static void waylandGlobalAddListener(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version) diff --git a/src/fastfetch.c b/src/fastfetch.c index af23ab6d4..8b6c9008d 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -176,10 +176,11 @@ static inline void printCommandHelp(const char* command) } else if(strcasecmp(command, "resolution-format") == 0) { - constructAndPrintCommandHelpFormat("resolution", "{}x{} @ {}Hz", 3, + constructAndPrintCommandHelpFormat("resolution", "{}x{} @ {}Hz", 4, "Screen width", "Screen height", - "Screen refresh rate" + "Screen refresh rate", + "Screen brightness" ); } else if(strcasecmp(command, "de-format") == 0)