diff options
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml')
| -rw-r--r-- | accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml b/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml index 2d3aca1b..3ae94346 100644 --- a/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml +++ b/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml | |||
| @@ -7,6 +7,8 @@ import QtQuick.Layouts | |||
| 7 | Row { | 7 | Row { |
| 8 | id: workspaces | 8 | id: workspaces |
| 9 | 9 | ||
| 10 | required property var screen | ||
| 11 | |||
| 10 | property var ignoreWorkspaces: @ignore_workspaces@ | 12 | property var ignoreWorkspaces: @ignore_workspaces@ |
| 11 | 13 | ||
| 12 | height: parent.height | 14 | height: parent.height |
| @@ -18,7 +20,7 @@ Row { | |||
| 18 | values: { | 20 | values: { |
| 19 | let currWorkspaces = NiriService.workspaces; | 21 | let currWorkspaces = NiriService.workspaces; |
| 20 | const ignoreWorkspaces = Array.from(workspaces.ignoreWorkspaces); | 22 | const ignoreWorkspaces = Array.from(workspaces.ignoreWorkspaces); |
| 21 | currWorkspaces = currWorkspaces.filter(ws => ws.is_active || ignoreWorkspaces.every(iws => iws !== ws.name)); | 23 | currWorkspaces = currWorkspaces.filter(ws => ws.output == workspaces.screen.name).filter(ws => ws.is_active || ignoreWorkspaces.every(iws => iws !== ws.name)); |
| 22 | currWorkspaces.sort((a, b) => { | 24 | currWorkspaces.sort((a, b) => { |
| 23 | if (NiriService.outputs?.[a.output]?.logical?.x !== NiriService.outputs?.[b.output]?.logical?.x) | 25 | if (NiriService.outputs?.[a.output]?.logical?.x !== NiriService.outputs?.[b.output]?.logical?.x) |
| 24 | return NiriService.outputs?.[a.output]?.logical?.x - NiriService.outputs?.[b.output]?.logical?.x | 26 | return NiriService.outputs?.[a.output]?.logical?.x - NiriService.outputs?.[b.output]?.logical?.x |
