Show the lock screen dashboard on the largest output
The password and dashboard followed the focused monitor at lock time. Put them on the largest output instead; the focused one only breaks ties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b96b0cb683
commit
da0a61b50b
1 file changed
+12
-2
@@ -58,6 +58,16 @@ Singleton {
|
||||
};
|
||||
}
|
||||
|
||||
// The dashboard goes on the largest output; the focused one breaks ties.
|
||||
function mainScreen() {
|
||||
const active = ScreenService.active;
|
||||
let best = active || null;
|
||||
for (const screen of Quickshell.screens) {
|
||||
if (!best || screen.width * screen.height > best.width * best.height)
|
||||
best = screen;
|
||||
}
|
||||
return best ? best.name : "";
|
||||
}
|
||||
function lock() {
|
||||
if (locked || grab.running)
|
||||
return;
|
||||
@@ -65,7 +75,7 @@ Singleton {
|
||||
ShellState.settingsOpen = false;
|
||||
ShellState.controlCenterOpen = false;
|
||||
ShellState.launcherOpen = false;
|
||||
primary = ScreenService.active ? ScreenService.active.name : "";
|
||||
primary = mainScreen();
|
||||
status = "";
|
||||
if (options.backdrop === "screenshot") {
|
||||
grab.names = Quickshell.screens.map(s => s.name).filter(n => /^[\w.-]+$/.test(n));
|
||||
@@ -78,7 +88,7 @@ Singleton {
|
||||
if (locked)
|
||||
return;
|
||||
ShellState.settingsOpen = false;
|
||||
primary = ScreenService.active ? ScreenService.active.name : "";
|
||||
primary = mainScreen();
|
||||
status = "";
|
||||
previewing = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user