mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 10:33:34 +00:00
Dock: Add option to filter by output.
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user