summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-09-29 15:24:18 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2025-09-29 15:24:18 +0200
commit4ddd4a18cd9f852d4d23510faae31dd0e0380866 (patch)
treedb27025055014163a2da0d7e677bde2967169d6d /accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml
parent5cee7108d60ca11ccba1b19ccad74664f6f96cf5 (diff)
downloadnixos-4ddd4a18cd9f852d4d23510faae31dd0e0380866.tar
nixos-4ddd4a18cd9f852d4d23510faae31dd0e0380866.tar.gz
nixos-4ddd4a18cd9f852d4d23510faae31dd0e0380866.tar.bz2
nixos-4ddd4a18cd9f852d4d23510faae31dd0e0380866.tar.xz
nixos-4ddd4a18cd9f852d4d23510faae31dd0e0380866.zip
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml4
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
7Row { 7Row {
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