mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-07 15:59:26 -05:00
28 lines
802 B
QML
28 lines
802 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"]);
|
|
}
|
|
}
|
|
|
|
StyledToolTip {
|
|
text: Translation.tr("Dark Mode")
|
|
}
|
|
}
|