From 4ddd4a18cd9f852d4d23510faae31dd0e0380866 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 29 Sep 2025 15:24:18 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 2 +- accounts/gkleen@sif/shell/quickshell/Bar.qml | 7 +++++-- accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml | 8 +++++++- accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml | 6 +++--- accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml | 4 +++- accounts/gkleen@sif/shell/quickshell/shell.qml | 2 +- 6 files changed, 20 insertions(+), 9 deletions(-) (limited to 'accounts/gkleen@sif') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 8e68eda9..36b722e4 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -482,7 +482,7 @@ in { }; }; qt.enable = true; - qt.platformTheme = "gtk"; + qt.platformTheme.name = "gtk"; qt.kde.settings = { kwalletrc = { diff --git a/accounts/gkleen@sif/shell/quickshell/Bar.qml b/accounts/gkleen@sif/shell/quickshell/Bar.qml index 426ed78c..9210066c 100644 --- a/accounts/gkleen@sif/shell/quickshell/Bar.qml +++ b/accounts/gkleen@sif/shell/quickshell/Bar.qml @@ -5,7 +5,8 @@ import QtQuick PanelWindow { id: bar - required property var screen + required property var modelData + screen: modelData WlrLayershell.namespace: "bar" @@ -39,7 +40,9 @@ PanelWindow { anchors.verticalCenter: parent.verticalCenter spacing: 8 - WorkspaceSwitcher {} + WorkspaceSwitcher { + screen: bar.screen + } } Row { diff --git a/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml b/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml index fa27093f..cc0e49b1 100644 --- a/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml +++ b/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml @@ -9,7 +9,9 @@ import QtQuick.Layouts import Quickshell.Services.Notifications Scope { - readonly property ShellScreen activeScreen: Array.from(Quickshell.screens).find(screen => screen.name === Array.from(NiriService.workspaces).find(ws => ws.is_focused)?.output) ?? null + id: root + + property var activeScreen: Array.from(Quickshell.screens).find(screen => screen.name === Array.from(NiriService.workspaces).find(ws => ws.is_focused)?.output) ?? null Instantiator { id: notifsRepeater @@ -23,6 +25,10 @@ Scope { visible: NotificationManager.active + screen: root.activeScreen + + WlrLayershell.namespace: "notifications" + required property var modelData required property var index diff --git a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml index af522ec4..cce614eb 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml @@ -134,10 +134,10 @@ Singleton { relevant_output = ws.output; }); root.workspaces = Array.from(root.workspaces).map(ws => { - if (ws.output === relevant_output) { + if (data.focused) + ws.is_focused = false; + if (ws.output === relevant_output) ws.is_active = false; - ws.is_focused = false; - } if (data.id === ws.id) { ws.is_active = true; ws.is_focused = data.focused; 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 Row { id: workspaces + required property var screen + property var ignoreWorkspaces: @ignore_workspaces@ height: parent.height @@ -18,7 +20,7 @@ Row { values: { let currWorkspaces = NiriService.workspaces; const ignoreWorkspaces = Array.from(workspaces.ignoreWorkspaces); - currWorkspaces = currWorkspaces.filter(ws => ws.is_active || ignoreWorkspaces.every(iws => iws !== ws.name)); + currWorkspaces = currWorkspaces.filter(ws => ws.output == workspaces.screen.name).filter(ws => ws.is_active || ignoreWorkspaces.every(iws => iws !== ws.name)); currWorkspaces.sort((a, b) => { if (NiriService.outputs?.[a.output]?.logical?.x !== NiriService.outputs?.[b.output]?.logical?.x) return NiriService.outputs?.[a.output]?.logical?.x - NiriService.outputs?.[b.output]?.logical?.x diff --git a/accounts/gkleen@sif/shell/quickshell/shell.qml b/accounts/gkleen@sif/shell/quickshell/shell.qml index 1a5875f0..fb8b16dc 100644 --- a/accounts/gkleen@sif/shell/quickshell/shell.qml +++ b/accounts/gkleen@sif/shell/quickshell/shell.qml @@ -36,7 +36,7 @@ ShellRoot { } Bar { - screen: screenScope.modelData + modelData: screenScope.modelData } } } -- cgit v1.2.3