mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-11 07:52:50 -05:00
power: replace hibernate with "suspend behavior" opt
This commit is contained in:
@@ -217,6 +217,20 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
function suspendThenHibernate() {
|
||||
Quickshell.execDetached([isElogind ? "loginctl" : "systemctl", "suspend-then-hibernate"])
|
||||
}
|
||||
|
||||
function suspendWithBehavior(behavior) {
|
||||
if (behavior === SettingsData.SuspendBehavior.Hibernate) {
|
||||
hibernate()
|
||||
} else if (behavior === SettingsData.SuspendBehavior.SuspendThenHibernate) {
|
||||
suspendThenHibernate()
|
||||
} else {
|
||||
suspend()
|
||||
}
|
||||
}
|
||||
|
||||
function reboot() {
|
||||
if (SettingsData.customPowerActionReboot.length === 0) {
|
||||
Quickshell.execDetached([isElogind ? "loginctl" : "systemctl", "reboot"])
|
||||
|
||||
Reference in New Issue
Block a user