Multi-Monitors: new setting to explicitely disable panels to appear on screen without bar.

On my setup this saves about 130MB per 1080p monitor where the bar is
not shown. I only interact with noctalia on my main screen.
This commit is contained in:
ItsLemmy
2025-11-16 20:49:56 -05:00
parent df37511089
commit dc08751ec2
16 changed files with 88 additions and 9 deletions
+25 -7
View File
@@ -18,12 +18,23 @@ Variants {
if (!modelData || !modelData.name) {
return false;
}
Logger.d("Shell", "MainScreen activated for", modelData?.name);
return true;
let shouldLoad = true;
if (!Settings.data.general.allowPanelsOnScreenWithoutBar) {
// Check if bar is configured for this screen
var monitors = Settings.data.bar.monitors || [];
shouldLoad = monitors.length === 0 || monitors.includes(modelData?.name);
}
if (shouldLoad) {
Logger.d("AllScreens", "Screen activated: ", modelData?.name);
}
return shouldLoad;
}
property bool windowLoaded: false
// Main Screen loader - Bar and panels backgrounds
Loader {
id: windowLoader
active: parent.shouldBeActive
@@ -58,7 +69,7 @@ Variants {
}
onLoaded: {
Logger.d("Shell", "BarContentWindow created for", modelData?.name);
Logger.d("AllScreens", "BarContentWindow created for", modelData?.name);
}
}
@@ -80,14 +91,21 @@ Variants {
}
onLoaded: {
Logger.d("Shell", "BarExclusionZone created for", modelData?.name);
Logger.d("AllScreens", "BarExclusionZone created for", modelData?.name);
}
}
// TrayMenuWindow - separate window for tray context menus
// This must be a top-level PanelWindow.
// Disabled when bar is hidden or not configured for this screen
Loader {
active: parent.windowLoaded && parent.shouldBeActive
active: {
if (!parent.windowLoaded || !parent.shouldBeActive || !BarService.isVisible)
return false;
// Check if bar is configured for this screen
var monitors = Settings.data.bar.monitors || [];
return monitors.length === 0 || monitors.includes(modelData?.name);
}
asynchronous: false
sourceComponent: TrayMenuWindow {
@@ -95,7 +113,7 @@ Variants {
}
onLoaded: {
Logger.d("Shell", "TrayMenuWindow created for", modelData?.name);
Logger.d("AllScreens", "TrayMenuWindow created for", modelData?.name);
}
}
}
+1
View File
@@ -55,6 +55,7 @@ PanelWindow {
color: Color.transparent
mask: null // No mask - content window is rectangular
visible: isPanelOpen
screen: placeholder.screen // Explicitly set screen to match placeholder
// Wayland layer shell configuration - fullscreen window
WlrLayershell.layer: WlrLayer.Top