1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

lock: allow custom lock command

This commit is contained in:
bbedward
2025-10-17 08:36:11 -04:00
parent b6f7f2734e
commit ce6c16214c
3 changed files with 46 additions and 2 deletions

View File

@@ -238,6 +238,7 @@ Singleton {
property bool osdAlwaysShowValue: false
property bool powerActionConfirm: true
property string customPowerActionLock: ""
property string customPowerActionLogout: ""
property string customPowerActionSuspend: ""
property string customPowerActionHibernate: ""
@@ -452,6 +453,7 @@ Singleton {
notificationPopupPosition = settings.notificationPopupPosition !== undefined ? settings.notificationPopupPosition : SettingsData.Position.Top
osdAlwaysShowValue = settings.osdAlwaysShowValue !== undefined ? settings.osdAlwaysShowValue : false
powerActionConfirm = settings.powerActionConfirm !== undefined ? settings.powerActionConfirm : true
customPowerActionLock = settings.customPowerActionLock != undefined ? settings.customPowerActionLock : ""
customPowerActionLogout = settings.customPowerActionLogout != undefined ? settings.customPowerActionLogout : ""
customPowerActionSuspend = settings.customPowerActionSuspend != undefined ? settings.customPowerActionSuspend : ""
customPowerActionHibernate = settings.customPowerActionHibernate != undefined ? settings.customPowerActionHibernate : ""
@@ -646,6 +648,7 @@ Singleton {
"notificationPopupPosition": notificationPopupPosition,
"osdAlwaysShowValue": osdAlwaysShowValue,
"powerActionConfirm": powerActionConfirm,
"customPowerActionLock": customPowerActionLock,
"customPowerActionLogout": customPowerActionLogout,
"customPowerActionSuspend": customPowerActionSuspend,
"customPowerActionHibernate": customPowerActionHibernate,
@@ -716,8 +719,8 @@ Singleton {
"hideBrightnessSlider", "widgetBackgroundColor", "surfaceBase",
"notificationTimeoutLow", "notificationTimeoutNormal", "notificationTimeoutCritical",
"notificationPopupPosition", "osdAlwaysShowValue", "powerActionConfirm",
"customPowerActionLogout", "customPowerActionSuspend", "customPowerActionHibernate",
"customPowerActionReboot", "customPowerActionPowerOff",
"customPowerActionLock", "customPowerActionLogout", "customPowerActionSuspend",
"customPowerActionHibernate", "customPowerActionReboot", "customPowerActionPowerOff",
"updaterUseCustomCommand", "updaterCustomCommand", "updaterTerminalAdditionalParams",
"screenPreferences", "animationSpeed", "acMonitorTimeout", "acLockTimeout",
"acSuspendTimeout", "acHibernateTimeout", "batteryMonitorTimeout", "batteryLockTimeout",
@@ -1713,6 +1716,11 @@ Singleton {
saveSettings();
}
function setCustomPowerActionLock(command) {
customPowerActionLock = command;
saveSettings();
}
function setCustomPowerActionLogout(command) {
customPowerActionLogout = command;
saveSettings();