|
1 | 1 | # Anxious Scroll Daemon |
2 | 2 |
|
3 | | -A custom userspace mouse scroll wheel daemon that intercepts and modifies scroll events from your physical mouse using the Linux evdev/uinput subsystem. |
| 3 | +A custom userspace mouse scroll wheel daemon that intercepts and modifies scroll events from your physical mouse using the Linux evdev/uinput subsystem. Transform your mouse's scroll behavior with smooth, dynamic sensitivity that adapts to your scrolling speed. |
4 | 4 |
|
5 | 5 | ## Overview |
6 | 6 |
|
7 | 7 | This project addresses the issue where the mouse firmware's "smart" scroll wheel behavior doesn't align with user preferences. Instead of modifying kernel drivers or system libraries, this daemon operates in userspace as a man-in-the-middle between your physical mouse and the input system. |
8 | 8 |
|
9 | | -## How It Works |
| 9 | + |
| 10 | +## 🏗️ Architecture |
10 | 11 |
|
11 | 12 | ``` |
12 | 13 | Physical Mouse → evdev → Our Daemon → uinput → Virtual Mouse → libinput → Xorg → Applications |
13 | 14 | ``` |
14 | 15 |
|
15 | | -## Status |
| 16 | +## 🧮 Scroll Transformation Algorithm |
| 17 | + |
| 18 | +The basic idea is based on quake-live acceleration, where the faster you scroll, the faster the "acceleration" multiplier is. But instead of a bunch of ramp up and ramp down functions, I've used a smooth signmoid curve instead. |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +The daemon uses a logistic function for smooth, natural acceleration: |
| 23 | + |
| 24 | +``` |
| 25 | +f(velocity) = max_sensitivity / (1 + C * e^(-ramp_rate * velocity)) |
| 26 | +``` |
| 27 | + |
| 28 | +Where: |
| 29 | +- `base_sensitivity`: Starting sensitivity (default: 1.0) |
| 30 | +- `max_sensitivity`: Maximum sensitivity (default: 15.0) |
| 31 | +- `ramp_rate`: How quickly to accelerate (default: 0.3) |
| 32 | +- `C = (max_sensitivity / base_sensitivity) - 1` |
| 33 | + |
| 34 | +This creates a smooth curve that starts slow for precision and ramps up for speed. |
| 35 | + |
| 36 | +## 🚀 Quick Start |
| 37 | + |
| 38 | +### Prerequisites |
| 39 | + |
| 40 | +- Linux system with evdev/uinput support |
| 41 | +- Rust toolchain (latest stable) |
| 42 | +- Root privileges (for device access) |
| 43 | + |
| 44 | +### Building |
| 45 | + |
| 46 | +```bash |
| 47 | +git clone <repository-url> |
| 48 | +cd cursor-anxious |
| 49 | +cargo build --release |
| 50 | +``` |
| 51 | + |
| 52 | +### Running |
| 53 | + |
| 54 | +```bash |
| 55 | +# Auto-detect mouse device |
| 56 | +sudo ./target/release/anxious-scroll-daemon |
16 | 57 |
|
17 | | -### Building! |
| 58 | +# Specify device manually |
| 59 | +sudo ./target/release/anxious-scroll-daemon --device /dev/input/event3 |
18 | 60 |
|
| 61 | +# Enable debug logging |
| 62 | +sudo ./target/release/anxious-scroll-daemon --debug |
| 63 | +``` |
| 64 | + |
| 65 | +### Finding Your Mouse Device |
| 66 | + |
| 67 | +```bash |
| 68 | +# List all input devices |
| 69 | +ls -l /dev/input/by-id/ |
| 70 | + |
| 71 | +# Test with evtest to see events |
| 72 | +sudo evtest /dev/input/event3 |
| 73 | +``` |
0 commit comments