diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2026-03-05 09:02:49 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2026-03-05 09:02:49 +0100 |
| commit | 445f6c2ee0a9a21d4de94dff621279887caa25a4 (patch) | |
| tree | 1d6849968f59a4a61d71e68682f4473f0a701c27 | |
| parent | a51282674852f1fb452ce6eb11e14b34064cc839 (diff) | |
| download | nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar.gz nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar.bz2 nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.tar.xz nixos-445f6c2ee0a9a21d4de94dff621279887caa25a4.zip | |
...
3 files changed, 23 insertions, 2 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/ActiveWindowDisplay.qml b/accounts/gkleen@sif/shell/quickshell/ActiveWindowDisplay.qml index dcc23279..ac1cbf3a 100644 --- a/accounts/gkleen@sif/shell/quickshell/ActiveWindowDisplay.qml +++ b/accounts/gkleen@sif/shell/quickshell/ActiveWindowDisplay.qml | |||
| @@ -11,7 +11,7 @@ Item { | |||
| 11 | 11 | ||
| 12 | property var activeWindow: { | 12 | property var activeWindow: { |
| 13 | let currWindowId = Array.from(NiriService.workspaces).find(ws => { | 13 | let currWindowId = Array.from(NiriService.workspaces).find(ws => { |
| 14 | return ws.output === screen.name && ws.is_active; | 14 | return ws.output === screen?.name && ws.is_active; |
| 15 | })?.active_window_id; | 15 | })?.active_window_id; |
| 16 | 16 | ||
| 17 | return currWindowId ? Array.from(NiriService.windows).find(win => win.id == currWindowId) : null; | 17 | return currWindowId ? Array.from(NiriService.windows).find(win => win.id == currWindowId) : null; |
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml index 8318df50..52103c6f 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/Brightness.qml | |||
| @@ -4,6 +4,7 @@ import QtQml | |||
| 4 | import Quickshell | 4 | import Quickshell |
| 5 | import Quickshell.Io | 5 | import Quickshell.Io |
| 6 | import Custom as Custom | 6 | import Custom as Custom |
| 7 | import qs.Services | ||
| 7 | 8 | ||
| 8 | Singleton { | 9 | Singleton { |
| 9 | id: root | 10 | id: root |
| @@ -72,4 +73,24 @@ Singleton { | |||
| 72 | watchChanges: true | 73 | watchChanges: true |
| 73 | onFileChanged: reload() | 74 | onFileChanged: reload() |
| 74 | } | 75 | } |
| 76 | |||
| 77 | |||
| 78 | Timer { | ||
| 79 | id: startupDelay | ||
| 80 | interval: 500 | ||
| 81 | running: true | ||
| 82 | repeat: false | ||
| 83 | } | ||
| 84 | property bool onlyInternal: true | ||
| 85 | Connections { | ||
| 86 | target: NiriService | ||
| 87 | onOutputsChanged: root.onlyInternal = Object.keys(NiriService.outputs).every(oname => oname == "eDP-1") | ||
| 88 | } | ||
| 89 | onOnlyInternalChanged: { | ||
| 90 | if (startupDelay.running) | ||
| 91 | return; | ||
| 92 | |||
| 93 | if (!root.onlyInternal) | ||
| 94 | root.currBrightness = 1 | ||
| 95 | } | ||
| 75 | } | 96 | } |
diff --git a/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml b/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml index 3ae94346..0dd1bca8 100644 --- a/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml +++ b/accounts/gkleen@sif/shell/quickshell/WorkspaceSwitcher.qml | |||
| @@ -20,7 +20,7 @@ Row { | |||
| 20 | values: { | 20 | values: { |
| 21 | let currWorkspaces = NiriService.workspaces; | 21 | let currWorkspaces = NiriService.workspaces; |
| 22 | const ignoreWorkspaces = Array.from(workspaces.ignoreWorkspaces); | 22 | const ignoreWorkspaces = Array.from(workspaces.ignoreWorkspaces); |
| 23 | currWorkspaces = currWorkspaces.filter(ws => ws.output == workspaces.screen.name).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)); |
| 24 | currWorkspaces.sort((a, b) => { | 24 | currWorkspaces.sort((a, b) => { |
| 25 | 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) |
| 26 | 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 |
