From 517707ef54168290de51e737d72412efa235fd3a Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Fri, 20 Dec 2024 15:24:04 -0800 Subject: [PATCH] Add support for KDE6. --- util_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util_linux.c b/util_linux.c index 7b352a0..f375382 100644 --- a/util_linux.c +++ b/util_linux.c @@ -16,9 +16,9 @@ int32_t get_desktop_env(void) { } else if (strcasestr(current_desktop, "kde")) { const char *session_version = getenv("KDE_SESSION_VERSION"); if (session_version) { - if (*session_version == '5') - return DESKTOP_ENV_KDE5; - return DESKTOP_ENV_KDE4; + if (*session_version > '0' && *session_version <= '4') + return DESKTOP_ENV_KDE4; + return DESKTOP_ENV_KDE5; } } }