feat(modules/bar): change darkmode without changing the wallpaper

This commit is contained in:
Hasan A. Tekeoğlu
2025-06-21 21:25:29 +03:00
parent cdbb72bec4
commit 5d9620881b
2 changed files with 5 additions and 9 deletions
@@ -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 {
@@ -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