forked from Shinonome/dots-hyprland
5d1a9b1e9c
Co-Authored-By: Vague Syntax <173799252+vaguesyntax@users.noreply.github.com>
24 lines
733 B
QML
24 lines
733 B
QML
import qs.modules.common
|
|
import qs.modules.common.widgets
|
|
import qs.services
|
|
import QtQuick
|
|
import Quickshell
|
|
|
|
AndroidQuickToggleButton {
|
|
id: root
|
|
|
|
name: Translation.tr("Dark Mode")
|
|
statusText: Appearance.m3colors.darkmode ? Translation.tr("Dark") : Translation.tr("Light")
|
|
|
|
toggled: Appearance.m3colors.darkmode
|
|
buttonIcon: Appearance.m3colors.darkmode ? "contrast" : "light_mode"
|
|
|
|
onClicked: event => {
|
|
if (Appearance.m3colors.darkmode) {
|
|
Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", "light", "--noswitch"]);
|
|
} else {
|
|
Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", "dark", "--noswitch"]);
|
|
}
|
|
}
|
|
}
|