Merge pull request #402 from luleyleo/output-filtered-dock

Per-monitor dock
This commit is contained in:
Lemmy
2025-09-30 17:36:14 -04:00
committed by GitHub
5 changed files with 30 additions and 11 deletions
+7 -3
View File
@@ -2,7 +2,7 @@
"settings": {
"general": {
"title": "Allgemein",
"profile": {
"section": {
"label": "Profil",
@@ -245,6 +245,10 @@
"section": {
"label": "Monitor-Anzeige",
"description": "Statusleiste auf bestimmten Monitoren anzeigen. Standard ist alle, wenn keine ausgewählt sind."
},
"only-same-output": {
"label": "Nur Apps vom gleichen Bildschirm",
"description": "Zeige nur Apps vom dem Bildschirm an, wo sich das Dock befindet."
}
}
},
@@ -1170,7 +1174,7 @@
"enter-width-pixels": "Breite in Pixeln eingeben",
"enter-command": "Befehl eingeben (App oder benutzerdefiniertes Skript)",
"command-example": "echo \"Hallo Welt\"",
"search-wallpapers": "Zum Filtern von Hintergrundbildern eingeben...",
"search-launcher": "Einträge suchen... oder > für Befehle verwenden",
"search": "Suchen...",
@@ -1242,7 +1246,7 @@
"frame-rates": {
"fps": "{fps} FPS"
},
"screen-recording": {
"sources": {
"portal": "Portal",
+9 -5
View File
@@ -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"
+1
View File
@@ -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<string> monitors: []
// Desktop entry IDs pinned to the dock (e.g., "org.kde.konsole", "firefox.desktop")
property list<string> pinnedApps: []
+6 -3
View File
@@ -51,6 +51,9 @@ Variants {
function onPinnedAppsChanged() {
updateDockApps()
}
function onOnlySameOutputChanged() {
updateDockApps()
}
}
// Initial update when component is ready
@@ -108,7 +111,7 @@ 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"
@@ -190,7 +193,7 @@ Variants {
// PEEK WINDOW - Always visible when auto-hide is enabled
Loader {
active: barIsReady && modelData && Settings.data.dock.monitors.includes(modelData.name) && autoHide
active: (barIsReady || !hasBar) && modelData && Settings.data.dock.monitors.includes(modelData.name) && autoHide
sourceComponent: PanelWindow {
id: peekWindow
@@ -236,7 +239,7 @@ Variants {
// DOCK WINDOW
Loader {
active: barIsReady && modelData && Settings.data.dock.monitors.includes(modelData.name) && dockLoaded && ToplevelManager && (dockApps.length > 0)
active: (barIsReady || !hasBar) && modelData && Settings.data.dock.monitors.includes(modelData.name) && dockLoaded && ToplevelManager && (dockApps.length > 0)
sourceComponent: PanelWindow {
id: dockWindow
+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