From f770f80230d8c9cd9f4c13fba61b4b80dc3665d8 Mon Sep 17 00:00:00 2001 From: Tomas Rivera <137088692+Totorile1@users.noreply.github.com> Date: Wed, 11 Mar 2026 11:06:28 +0100 Subject: [PATCH] resolved a probleme between upower and quickshell --- other/quickshell/Globals.qml | 27 --------------------------- other/quickshell/bar/Power.qml | 2 +- other/quickshell/bar/Theme.qml | 31 ------------------------------- 3 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 other/quickshell/bar/Theme.qml diff --git a/other/quickshell/Globals.qml b/other/quickshell/Globals.qml index 5b1fb63..f852a28 100644 --- a/other/quickshell/Globals.qml +++ b/other/quickshell/Globals.qml @@ -2,34 +2,7 @@ pragma Singleton import QtQuick import Quickshell -import Quickshell.Io Singleton { id: root - - /*readonly property var getThemeProc: Process { - running: true - command: ["gsettings", "get", "org.gnome.desktop.interface", "color-scheme"] - stdout: SplitParser { - onRead: data => root.isDarkTheme = data == "'prefer-dark'" - } - } - property var isDarkTheme: false - readonly property var kittenThemeProc: Process { - command: ["kitten", "theme", "--reload-in=all", `"Gruvbox ${root.isDarkTheme ? "Dark" : "Light"} Soft"`] - } - readonly property var gtk4ThemeProc: Process { - command: ["gsettings", "set", "org.gnome.desktop.interface", "color-scheme", `"prefer-${root.isDarkTheme ? "dark" : "light"}"`] - } - readonly property var gtk3ThemeProc: Process { - command: ["gsettings", "set", "org.gnome.desktop.interface", "gtk-theme", `"Adwaita${root.isDarkTheme ? "-dark" : ""}"`] - } - onIsDarkThemeChanged: () => { - kittenThemeProc.command = ["kitten", "theme", "--reload-in=all", `Gruvbox ${root.isDarkTheme ? "Dark" : "Light"} Soft`]; - kittenThemeProc.running = true; - gtk4ThemeProc.command = ["gsettings", "set", "org.gnome.desktop.interface", "color-scheme", `"prefer-${root.isDarkTheme ? "dark" : "light"}"`]; - gtk4ThemeProc.running = true; - gtk3ThemeProc.command = ["gsettings", "set", "org.gnome.desktop.interface", "gtk-theme", `"Adwaita${root.isDarkTheme ? "-dark" : ""}"`]; - gtk3ThemeProc.running = true; - }*/ } diff --git a/other/quickshell/bar/Power.qml b/other/quickshell/bar/Power.qml index 56b38d5..6c917d9 100644 --- a/other/quickshell/bar/Power.qml +++ b/other/quickshell/bar/Power.qml @@ -13,7 +13,7 @@ Item { readonly property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge readonly property real percentage: UPower.displayDevice.percentage readonly property bool isLow: percentage <= 0.20 - readonly property bool isLaptop: UPowerDevice.isLaptopBattery + readonly property bool isLaptop: true // hardcoded because this doesnt work UPowerDevice.isLaptopBattery width: 32 height: 32 diff --git a/other/quickshell/bar/Theme.qml b/other/quickshell/bar/Theme.qml deleted file mode 100644 index 891bf0f..0000000 --- a/other/quickshell/bar/Theme.qml +++ /dev/null @@ -1,31 +0,0 @@ -import QtQuick -import Quickshell -import QtQuick.Layouts -import "../" - -MouseArea { - id: root - - implicitWidth: 26 - implicitHeight: 26 - - hoverEnabled: true - acceptedButtons: Qt.LeftButton - - Image { - anchors.fill: parent - source: `../assets/${Globals.isDarkTheme ? "sun" : "moon"}.png` - smooth: false - - scale: root.containsMouse ? 0.9 : 1 - Behavior on scale { - NumberAnimation { - duration: 70 - } - } - } - - onPressed: () => { - Globals.isDarkTheme = !Globals.isDarkTheme; - } -}