diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-16 16:07:13 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-16 16:07:13 +1000 |
| commit | 00b5e88a3268dce07429786419f34105d68e3d8d (patch) | |
| tree | 91069d24c9ae1b27060f935eb0ff438e1445e374 /modules/bar/Bar.qml | |
| parent | bar/workspaces: add special ws overlay (diff) | |
| download | caelestia-shell-00b5e88a3268dce07429786419f34105d68e3d8d.tar.gz caelestia-shell-00b5e88a3268dce07429786419f34105d68e3d8d.tar.bz2 caelestia-shell-00b5e88a3268dce07429786419f34105d68e3d8d.zip | |
bar/workspaces: better scroll
Diffstat (limited to 'modules/bar/Bar.qml')
| -rw-r--r-- | modules/bar/Bar.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 58a30d1..09cebee 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -56,10 +56,11 @@ ColumnLayout { const ch = childAt(width / 2, y) as WrappedLoader; if (ch?.id === "workspaces") { // Workspace scroll - const activeWs = Hyprland.activeToplevel?.workspace?.name; - if (activeWs?.startsWith("special:")) - Hyprland.dispatch(`togglespecialworkspace ${activeWs.slice(8)}`); - else if (angleDelta.y < 0 || Hyprland.activeWsId > 1) + const mon = (Config.bar.workspaces.perMonitorWorkspaces ? Hyprland.monitorFor(screen) : Hyprland.focusedMonitor); + const specialWs = mon?.lastIpcObject.specialWorkspace.name; + if (specialWs?.length > 0) + Hyprland.dispatch(`togglespecialworkspace ${specialWs.slice(8)}`); + else if (angleDelta.y < 0 || (Config.bar.workspaces.perMonitorWorkspaces ? mon.activeWorkspace?.id : Hyprland.activeWsId) > 1) Hyprland.dispatch(`workspace r${angleDelta.y > 0 ? "-" : "+"}1`); } else if (y < screen.height / 2) { // Volume scroll on top half |