mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
feat(modules/bar): change darkmode without changing the wallpaper
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user