mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
28 lines
754 B
QML
28 lines
754 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: "contrast"
|
|
|
|
mainAction: () => {
|
|
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")
|
|
}
|
|
}
|