diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 4d307af2..5e272038 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -2,7 +2,7 @@ "settings": { "general": { "title": "General", - + "profile": { "section": { "label": "Profile", @@ -285,6 +285,10 @@ "section": { "label": "Monitor display", "description": "Choose which monitor to display the dock on." + }, + "only-same-output": { + "label": "Only apps from same output", + "description": "Show only apps from the output where the dock is located." } } }, @@ -1162,7 +1166,7 @@ "enter-width-pixels": "Enter width in pixels", "enter-command": "Enter command to execute (app or custom script)", "command-example": "echo \"Hello World\"", - + "search-wallpapers": "Type to filter wallpapers...", "search-launcher": "Search entries... or use > for commands", "search": "Search...", @@ -1264,7 +1268,7 @@ "lock-subtitle": "Lock your session", "lock-and-suspend": "Lock and Suspend", "lock-and-suspend-subtitle": "Lock session and put system to sleep", - "suspend": "Suspend", + "suspend": "Suspend", "suspend-subtitle": "Put system to sleep", "reboot": "Reboot", "reboot-subtitle": "Restart your computer", @@ -1385,7 +1389,7 @@ }, "weather": { "clear-sky": "Clear sky", - "mainly-clear": "Mainly clear", + "mainly-clear": "Mainly clear", "partly-cloudy": "Partly cloudy", "overcast": "Overcast", "fog": "Fog", @@ -1395,7 +1399,7 @@ "thunderstorm": "Thunderstorm", "unknown": "Unknown" }, - + "authentication": { "failed": "Authentication failed", "error": "Authentication error" diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 8b581e8b..e52f663c 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -247,6 +247,7 @@ Singleton { property bool exclusive: false property real backgroundOpacity: 1.0 property real floatingRatio: 1.0 + property bool onlySameOutput: true property list monitors: [] // Desktop entry IDs pinned to the dock (e.g., "org.kde.konsole", "firefox.desktop") property list pinnedApps: [] diff --git a/Modules/Dock/Dock.qml b/Modules/Dock/Dock.qml index 57df42ec..8f31af3b 100644 --- a/Modules/Dock/Dock.qml +++ b/Modules/Dock/Dock.qml @@ -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" diff --git a/Modules/Settings/Tabs/DockTab.qml b/Modules/Settings/Tabs/DockTab.qml index c3b1d559..55af3a6a 100644 --- a/Modules/Settings/Tabs/DockTab.qml +++ b/Modules/Settings/Tabs/DockTab.qml @@ -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