summaryrefslogtreecommitdiff
path: root/modules/bar/components
diff options
context:
space:
mode:
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:"))