From 5d9620881b00cacf9880cbed93fb21cecaf471ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20A=2E=20Tekeo=C4=9Flu?= <55619655+tekeoglan@users.noreply.github.com> Date: Sat, 21 Jun 2025 21:25:29 +0300 Subject: [PATCH] feat(modules/bar): change darkmode without changing the wallpaper --- .config/quickshell/modules/bar/UtilButtons.qml | 8 ++++---- .config/quickshell/modules/common/ConfigOptions.qml | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.config/quickshell/modules/bar/UtilButtons.qml b/.config/quickshell/modules/bar/UtilButtons.qml index ee94d42fe..a30ce05e4 100644 --- a/.config/quickshell/modules/bar/UtilButtons.qml +++ b/.config/quickshell/modules/bar/UtilButtons.qml @@ -85,15 +85,15 @@ Item { } Loader { - active: ConfigOptions.bar.utilButtons.darkMode.show - visible: ConfigOptions.bar.utilButtons.darkMode.show + active: ConfigOptions.bar.utilButtons.showDarkModeToggle + visible: ConfigOptions.bar.utilButtons.showDarkModeToggle sourceComponent: CircleUtilButton { Layout.alignment: Qt.AlignVCenter onClicked: event => { if (Appearance.m3colors.darkmode) { - Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} ${ConfigOptions.bar.utilButtons.darkMode.lightImgPath} --mode light`); + Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode light --noswitch`); } else { - Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} ${ConfigOptions.bar.utilButtons.darkMode.darkImgPath} --mode dark`); + Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`); } } MaterialSymbol { diff --git a/.config/quickshell/modules/common/ConfigOptions.qml b/.config/quickshell/modules/common/ConfigOptions.qml index 1488c246a..241fcecf1 100644 --- a/.config/quickshell/modules/common/ConfigOptions.qml +++ b/.config/quickshell/modules/common/ConfigOptions.qml @@ -61,11 +61,7 @@ Singleton { property bool showColorPicker: false property bool showMicToggle: false property bool showKeyboardToggle: true - property QtObject darkMode: QtObject { - property bool show: true - property string lightImgPath: "" - property string darkImgPath: "" - } + property bool showDarkModeToggle: true } property QtObject tray: QtObject { property bool monochromeIcons: true