forked from Shinonome/dots-hyprland
feat(modules/bar): change darkmode without changing the wallpaper
This commit is contained in:
@@ -85,15 +85,15 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: ConfigOptions.bar.utilButtons.darkMode.show
|
active: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
||||||
visible: ConfigOptions.bar.utilButtons.darkMode.show
|
visible: ConfigOptions.bar.utilButtons.showDarkModeToggle
|
||||||
sourceComponent: CircleUtilButton {
|
sourceComponent: CircleUtilButton {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
onClicked: event => {
|
onClicked: event => {
|
||||||
if (Appearance.m3colors.darkmode) {
|
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 {
|
} else {
|
||||||
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} ${ConfigOptions.bar.utilButtons.darkMode.darkImgPath} --mode dark`);
|
Hyprland.dispatch(`exec ${Directories.wallpaperSwitchScriptPath} --mode dark --noswitch`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MaterialSymbol {
|
MaterialSymbol {
|
||||||
|
|||||||
@@ -61,11 +61,7 @@ Singleton {
|
|||||||
property bool showColorPicker: false
|
property bool showColorPicker: false
|
||||||
property bool showMicToggle: false
|
property bool showMicToggle: false
|
||||||
property bool showKeyboardToggle: true
|
property bool showKeyboardToggle: true
|
||||||
property QtObject darkMode: QtObject {
|
property bool showDarkModeToggle: true
|
||||||
property bool show: true
|
|
||||||
property string lightImgPath: ""
|
|
||||||
property string darkImgPath: ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
property QtObject tray: QtObject {
|
property QtObject tray: QtObject {
|
||||||
property bool monochromeIcons: true
|
property bool monochromeIcons: true
|
||||||
|
|||||||
Reference in New Issue
Block a user