summaryrefslogtreecommitdiff
path: root/modules/bar/components
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 13:48:30 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-02 13:48:30 +1000
commit7ee7dc59a6f2a99b5afae22f730164a9e15ed104 (patch)
tree7ab7f04dcc67fe0c61a0f86d618adcacfc7c7482 /modules/bar/components
parentfeat: launcher base (diff)
downloadcaelestia-shell-7ee7dc59a6f2a99b5afae22f730164a9e15ed104.tar.gz
caelestia-shell-7ee7dc59a6f2a99b5afae22f730164a9e15ed104.tar.bz2
caelestia-shell-7ee7dc59a6f2a99b5afae22f730164a9e15ed104.zip
bar: fix workspaces switching
Fix throwing errors when trying to switch to current ws
Diffstat (limited to 'modules/bar/components')
-rw-r--r--modules/bar/components/workspaces/Workspaces.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/bar/components/workspaces/Workspaces.qml b/modules/bar/components/workspaces/Workspaces.qml
index 1920ffc..0d9817a 100644
--- a/modules/bar/components/workspaces/Workspaces.qml
+++ b/modules/bar/components/workspaces/Workspaces.qml
@@ -70,7 +70,11 @@ Item {
MouseArea {
anchors.fill: parent
- onPressed: event => Hyprland.dispatch(`workspace ${layout.childAt(event.x, event.y).index + root.groupOffset + 1}`)
+ onPressed: event => {
+ const ws = layout.childAt(event.x, event.y).index + root.groupOffset + 1;
+ if (Hyprland.activeWsId !== ws)
+ Hyprland.dispatch(`workspace ${ws}`);
+ }
onWheel: event => {
const activeWs = Hyprland.activeClient?.workspace?.name;
if (activeWs?.startsWith("special:"))