1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

lock: add option to show on 1 display

fixes #607
This commit is contained in:
bbedward
2025-12-03 12:15:22 -05:00
parent f236706d6a
commit 2c7f24a913
4 changed files with 158 additions and 2 deletions

View File

@@ -84,13 +84,23 @@ Scope {
WlSessionLockSurface {
id: lockSurface
color: "transparent"
property string currentScreenName: screen?.name ?? ""
property bool isActiveScreen: {
if (Quickshell.screens.length <= 1)
return true;
if (SettingsData.lockScreenActiveMonitor === "all")
return true;
return currentScreenName === SettingsData.lockScreenActiveMonitor;
}
color: isActiveScreen ? "transparent" : SettingsData.lockScreenInactiveColor
LockSurface {
anchors.fill: parent
visible: lockSurface.isActiveScreen
lock: sessionLock
sharedPasswordBuffer: root.sharedPasswordBuffer
screenName: lockSurface.screen?.name ?? ""
screenName: lockSurface.currentScreenName
isLocked: shouldLock
onUnlockRequested: {
root.unlock();