From 0844e44a32d0a0b8c9c1c328a1a5498a31fd91d1 Mon Sep 17 00:00:00 2001 From: fabio-garavini Date: Thu, 30 Jan 2025 12:09:51 +0100 Subject: [PATCH] mouse scroll on bar --- .config/ags/modules/bar/focus/workspaces_hyprland.js | 4 ++-- .config/ags/modules/bar/normal/system.js | 2 +- .config/ags/modules/bar/normal/workspaces_hyprland.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/ags/modules/bar/focus/workspaces_hyprland.js b/.config/ags/modules/bar/focus/workspaces_hyprland.js index 77fe47935..58ca462cb 100644 --- a/.config/ags/modules/bar/focus/workspaces_hyprland.js +++ b/.config/ags/modules/bar/focus/workspaces_hyprland.js @@ -170,8 +170,8 @@ const WorkspaceContents = (count = 10) => { } export default () => EventBox({ - onScrollUp: () => Hyprland.messageAsync(`dispatch workspace -1`).catch(print), - onScrollDown: () => Hyprland.messageAsync(`dispatch workspace +1`).catch(print), + onScrollUp: () => Hyprland.messageAsync(`dispatch workspace r-1`).catch(print), + onScrollDown: () => Hyprland.messageAsync(`dispatch workspace r+1`).catch(print), onMiddleClick: () => toggleWindowOnAllMonitors('osk'), onSecondaryClick: () => App.toggleWindow('overview'), attribute: { diff --git a/.config/ags/modules/bar/normal/system.js b/.config/ags/modules/bar/normal/system.js index 6e4907eb2..8414c51d9 100644 --- a/.config/ags/modules/bar/normal/system.js +++ b/.config/ags/modules/bar/normal/system.js @@ -216,7 +216,7 @@ const BatteryModule = () => Stack({ const switchToRelativeWorkspace = async (self, num) => { try { const Hyprland = (await import('resource:///com/github/Aylur/ags/service/hyprland.js')).default; - Hyprland.messageAsync(`dispatch workspace ${num > 0 ? '+' : ''}${num}`).catch(print); + Hyprland.messageAsync(`dispatch workspace r${num > 0 ? '+' : ''}${num}`).catch(print); } catch { execAsync([`${App.configDir}/scripts/sway/swayToRelativeWs.sh`, `${num}`]).catch(print); } diff --git a/.config/ags/modules/bar/normal/workspaces_hyprland.js b/.config/ags/modules/bar/normal/workspaces_hyprland.js index 2f9b373af..8e7e789bc 100644 --- a/.config/ags/modules/bar/normal/workspaces_hyprland.js +++ b/.config/ags/modules/bar/normal/workspaces_hyprland.js @@ -179,8 +179,8 @@ const WorkspaceContents = (count = 10) => { } export default () => EventBox({ - onScrollUp: () => Hyprland.messageAsync(`dispatch workspace -1`).catch(print), - onScrollDown: () => Hyprland.messageAsync(`dispatch workspace +1`).catch(print), + onScrollUp: () => Hyprland.messageAsync(`dispatch workspace r-1`).catch(print), + onScrollDown: () => Hyprland.messageAsync(`dispatch workspace r+1`).catch(print), onMiddleClick: () => toggleWindowOnAllMonitors('osk'), onSecondaryClick: () => App.toggleWindow('overview'), attribute: {