Dock: Add option to filter by output.

This commit is contained in:
Leopold Luley
2025-09-30 23:01:46 +02:00
parent 32712c7052
commit fdc61acfe4
4 changed files with 24 additions and 6 deletions
+7 -1
View File
@@ -51,6 +51,9 @@ Variants {
function onPinnedAppsChanged() {
updateDockApps()
}
function onOnlySameOutputChanged() {
updateDockApps()
}
}
// Initial update when component is ready
@@ -108,7 +111,10 @@ Variants {
// Strategy: Maintain app positions as much as possible
// 1. First pass: Add all running apps (both pinned and non-pinned) in their current order
runningApps.forEach(toplevel => {
if (toplevel && toplevel.appId) {
if (
toplevel && toplevel.appId
&& !(Settings.data.dock.onlySameOutput && toplevel.screens && !toplevel.screens.includes(modelData))
) {
const isPinned = pinnedApps.includes(toplevel.appId)
const appType = isPinned ? "pinned-running" : "running"
+7
View File
@@ -118,6 +118,13 @@ ColumnLayout {
}
}
NToggle {
label: I18n.tr("settings.dock.monitors.only-same-output.label")
description: I18n.tr("settings.dock.monitors.only-same-output.description")
checked: Settings.data.dock.onlySameOutput
onToggled: checked => Settings.data.dock.onlySameOutput = checked
}
NDivider {
Layout.fillWidth: true
Layout.topMargin: Style.marginXL * scaling