Hello everyone!
I have been using Linux for years while at the same time gaming on windows and using mac for work. And two things always bothered me under linux comparing to other operating systems. The font rendering and the sloppy mouse problem. The font rendering is mostly solved in modern distros and I think it is pretty good under Omarchy/Arch too. But the sloppy mouse movement was and still stays unresolved because mouse acceleretation on Mac and Windows works much better than under X/Wayland.
So with a little research and some help in reddit, I found and ported to Wayland (with the help of AI) a custom script that would take into account your screen size, resolution, ppi and your mouse DPI and hopefully generate a very custom libinput custom acceleration profile you can use.
I have been testing this for a week now and very happy with the results, wanted to share so the like minded people could use and improve upon. Here is small guide you can follow to try it.
Guide: Getting Windows-like mouse acceleration ("Enhance pointer precision") on Omarchy / Hyprland
If you're coming from Windows and neither flat nor libinput's default adaptive mouse acceleration feels quite right on Omarchy, you can replicate the Windows acceleration curve natively in Hyprland using libinput's custom acceleration profile.
I updated a popular X11 curve-generator script to support Wayland (Hyprland, Hyprland Lua / Omarchy, and labwc) with CLI flags and --auto hardware detection:
Gist: https://gist.github.com/amiroff/8cff478c38f3af5e3b54b2c6635e6e50
──────
Quick Setup (Omarchy)
1. Download the script
curl -fsSL https://gist.githubusercontent.com/amiroff/8cff478c38f3af5e3b54b2c6635e6e50/raw/windows-acceleration-function.py -o windows-acceleration-function.py
2. Generate your curve
Run with --auto to automatically detect your focused monitor's PPI and scale (via hyprctl), your mouse device name, and your Logitech mouse DPI (if solaar is installed):
python3 windows-acceleration-function.py --auto --format hyprland-lua
If you don't use solaar (or want to specify your mouse DPI manually), pass --dpi:
python3 windows-acceleration-function.py --auto --dpi 1600 --format hyprland-lua
(Run with --help to see all options, including --format hyprland for standard hyprland.conf or --format labwc.)
3. Add it to ~/.config/hypr/input.lua
Paste the generated hl.device(...) block at the bottom of ~/.config/hypr/input.lua. Using a per-device block keeps the curve scoped to your mouse so a touchpad or second mouse with a different DPI isn't affected:
hl.device({
name = "your-mouse-device-name", -- find yours with: hyprctl devices
sensitivity = 0,
accel_profile = "custom <step> <points...>",
})
4. Reload and verify
hyprctl reload && hyprctl configerrors
(If hyprctl configerrors prints nothing, you're good to go!)
──────
Tuning Tips
• Overall speed feels too slow/fast (especially on scaled 4K displays): Adjust --sensitivity (default 1.0 = Windows 6/11 notch). On a 31.
5" 4K monitor at scale = 2, --sensitivity 2.0 is a much better starting point.
• Slow precision feels great, but fast flicks feel too short (or too fast): Use --flick-multipliers to scale the 5 curve knees independently without changing your slow precision zone, e.g.:
python3 windows-acceleration-function.py --auto --sensitivity 2.0 --flick-multipliers 1,1,1.8,2.5,2.75 --format hyprland-lua
Credit to the original ESReality research and X11 libinput script that this Wayland version builds upon.