forked from Shinonome/dots-hyprland
mouse scroll on bar
This commit is contained in:
@@ -170,8 +170,8 @@ const WorkspaceContents = (count = 10) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default () => EventBox({
|
export default () => EventBox({
|
||||||
onScrollUp: () => Hyprland.messageAsync(`dispatch workspace -1`).catch(print),
|
onScrollUp: () => Hyprland.messageAsync(`dispatch workspace r-1`).catch(print),
|
||||||
onScrollDown: () => Hyprland.messageAsync(`dispatch workspace +1`).catch(print),
|
onScrollDown: () => Hyprland.messageAsync(`dispatch workspace r+1`).catch(print),
|
||||||
onMiddleClick: () => toggleWindowOnAllMonitors('osk'),
|
onMiddleClick: () => toggleWindowOnAllMonitors('osk'),
|
||||||
onSecondaryClick: () => App.toggleWindow('overview'),
|
onSecondaryClick: () => App.toggleWindow('overview'),
|
||||||
attribute: {
|
attribute: {
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ const BatteryModule = () => Stack({
|
|||||||
const switchToRelativeWorkspace = async (self, num) => {
|
const switchToRelativeWorkspace = async (self, num) => {
|
||||||
try {
|
try {
|
||||||
const Hyprland = (await import('resource:///com/github/Aylur/ags/service/hyprland.js')).default;
|
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 {
|
} catch {
|
||||||
execAsync([`${App.configDir}/scripts/sway/swayToRelativeWs.sh`, `${num}`]).catch(print);
|
execAsync([`${App.configDir}/scripts/sway/swayToRelativeWs.sh`, `${num}`]).catch(print);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,8 +179,8 @@ const WorkspaceContents = (count = 10) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default () => EventBox({
|
export default () => EventBox({
|
||||||
onScrollUp: () => Hyprland.messageAsync(`dispatch workspace -1`).catch(print),
|
onScrollUp: () => Hyprland.messageAsync(`dispatch workspace r-1`).catch(print),
|
||||||
onScrollDown: () => Hyprland.messageAsync(`dispatch workspace +1`).catch(print),
|
onScrollDown: () => Hyprland.messageAsync(`dispatch workspace r+1`).catch(print),
|
||||||
onMiddleClick: () => toggleWindowOnAllMonitors('osk'),
|
onMiddleClick: () => toggleWindowOnAllMonitors('osk'),
|
||||||
onSecondaryClick: () => App.toggleWindow('overview'),
|
onSecondaryClick: () => App.toggleWindow('overview'),
|
||||||
attribute: {
|
attribute: {
|
||||||
|
|||||||
Reference in New Issue
Block a user