diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-28 18:31:00 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-28 18:31:00 +1000 |
| commit | 41600c94ddee0dd883e108c74a5e4db2c743a5aa (patch) | |
| tree | a58090e08bdeb9d5e9f39dd2e9177321c569030f /modules/bar | |
| parent | bar: workspaces better anim (diff) | |
| download | caelestia-shell-41600c94ddee0dd883e108c74a5e4db2c743a5aa.tar.gz caelestia-shell-41600c94ddee0dd883e108c74a5e4db2c743a5aa.tar.bz2 caelestia-shell-41600c94ddee0dd883e108c74a5e4db2c743a5aa.zip | |
bar: workspaces events
Diffstat (limited to 'modules/bar')
| -rw-r--r-- | modules/bar/Workspaces.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/bar/Workspaces.qml b/modules/bar/Workspaces.qml index 699185a..97a1934 100644 --- a/modules/bar/Workspaces.qml +++ b/modules/bar/Workspaces.qml @@ -41,6 +41,18 @@ Item { } } + MouseArea { + anchors.fill: parent + + onPressed: event => Hyprland.dispatch(`workspace ${layout.childAt(event.x, event.y).index + 1}`) + onWheel: event => { + if (event.angleDelta.y < 0) + Hyprland.dispatch(`workspace r+1`); + else if (event.angleDelta.y > 0 && Hyprland.activeWorkspace.id > 1) + Hyprland.dispatch(`workspace r-1`); + } + } + Rectangle { id: active |