Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scroll-factor Window Rule #1026

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Conversation

bbb651
Copy link
Contributor

@bbb651 bbb651 commented Jan 20, 2025

Example window rule:

window-rule {
	match app-id=r#"^wev$"#
	scroll-factor 4
}

Note this multiples the scroll factor rather than override it like the issue suggested. This way you can normalize all the window scroll factors once, and it'll scale like you'd expect when changing your input scroll factor and when using multiple input devices with different scroll factors. You can "reset" a scroll factor by setting it to the input device's scroll factor inverse.

Fixes #909.

Copy link
Owner

@YaLTeR YaLTeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looks good

src/input/mod.rs Outdated Show resolved Hide resolved
@YaLTeR YaLTeR force-pushed the scroll-factor-window-rule branch from 5ca1550 to 4e398dd Compare January 23, 2025 08:58
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 23, 2025

Rebased and made it work in popups too.

@YaLTeR YaLTeR enabled auto-merge (rebase) January 23, 2025 08:58
@YaLTeR YaLTeR merged commit 128b01e into YaLTeR:main Jan 23, 2025
10 checks passed
@YaLTeR
Copy link
Owner

YaLTeR commented Jan 23, 2025

Thanks. Guess it would make sense to add as a layer rule too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scroll Factor Window Rule
2 participants