forked from Shinonome/dots-hyprland
refractor quick toggles data, add volume slider for waffles action center
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.common.widgets
|
||||
|
||||
QuickToggleModel {
|
||||
name: Translation.tr("Dark Mode")
|
||||
statusText: Appearance.m3colors.darkmode ? Translation.tr("Dark") : Translation.tr("Light")
|
||||
|
||||
toggled: Appearance.m3colors.darkmode
|
||||
icon: "contrast"
|
||||
|
||||
mainAction: () => {
|
||||
if (Appearance.m3colors.darkmode) {
|
||||
Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", "light", "--noswitch"]);
|
||||
} else {
|
||||
Quickshell.execDetached([Directories.wallpaperSwitchScriptPath, "--mode", "dark", "--noswitch"]);
|
||||
}
|
||||
}
|
||||
|
||||
tooltipText: Translation.tr("Dark Mode")
|
||||
}
|
||||
Reference in New Issue
Block a user