midscroll is a Linux daemon that provides Windows‑style middle‑button drag autoscroll system‑wide by operating at the kernel input layer (evdev/uinput), working on both Wayland and X11 without depending on any specific desktop or toolkit.

Stars

166

7-day growth

No data

Forks

3

Open issues

2

License

Unlicense

Last updated

2026-07-27

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It replicates Windows autoscroll exactly (including Chromium's speed formula) at the input layer, works in every app on any desktop, includes a GTK settings GUI, and is deliberately small and dependency‑light with strong security sandboxing.

Who it is for

  • Linux users who miss Windows 10/11 autoscroll behavior
  • Power users who want system‑wide scrolling control
  • Developers looking for a reference implementation of evdev/uinput autoscroll
  • Wayland users needing a desktop‑agnostic scroll tool

Use cases

  • Scrolling long web pages or documents with one middle‑click hold and drag
  • Panning wide pages or spreadsheets by dragging diagonally
  • Using toggle mode (click to start/stop) for a Firefox‑ or Explorer‑style autoscroll
  • Adding autoscroll to applications that lack native middle‑drag support

Strengths

  • Works at the kernel input layer, so it functions identically on Wayland and X11 without desktop integration hacks
  • Uses the exact Chromium/Edge Windows autoscroll speed formula for familiar feel
  • Includes a GTK settings GUI with sliders and switches for easy tuning
  • Both daemon and overlay services are sandboxed with systemd security features, encouraging code review

Considerations

  • The scroll badge and ghost cursor overlay only work on KDE Plasma (Wayland); other desktops get no visual indicator
  • The app blacklist has a ~1 second delay when switching windows, which can cause a brief unwanted scroll
  • Requires root for the daemon and system‑wide config, which may deter some users; not available as a Flatpak

README quick start

midscroll

Windows-style middle-button drag autoscroll for Linux.

Hold the middle mouse button and drag. The page scrolls in that direction, faster the farther you drag from where you pressed, like Windows 10/11. Release to stop. A quick middle click without dragging still works as a normal middle click (paste, open link in new tab). Diagonal drags scroll both axes, so it pans wide pages too.

Prefer clicking to holding? Turn on toggle mode (in the settings GUI or TOGGLE_MODE = true) for the Windows-Explorer / Firefox style instead: one middle click starts autoscroll, the cursor moves freely, and any click stops it.

It works in every app, on Wayland and X11, because it operates at the kernel input layer (evdev in, uinput out) instead of hooking any particular desktop or toolkit.

Details:

  • The speed curve is Chromium/Edge's actual Windows autoscroll formula (0.000008 * distance^2.2 px/ms, 15 px per-axis dead zone): tiny drags crawl, a full-screen drag flies.
  • While scrolling, the real pointer stays anchored at the press point, so the scroll stays locked to the window you started in. Dragging "over" the taskbar or another window can't steal it.
  • It still looks like Windows while you do it: a badge with a vertical-arrows icon stays locked at the press point, and a ghost cursor follows your hand from there - a copy of your own pointer, read from your cursor theme. The ghost is only drawn: it can't click, hover or focus anything, which is what lets the scroll stay put while you see where you are (KDE Plasma Wayland; see notes below).
  • Apps that use middle-drag themselves (FreeCAD, OrcaSlicer and Minecraft by default) are blacklisted by window class: while one of them is focused, midscroll pauses itself and the middle button behaves natively.
  • The desktop and panels are left alone by default: while a desktop shell (plasmashell, xfdesktop, waybar, GNOME Shell, ...) is focused midscroll pauses, so a middle-drag can't hijack the desktop. Turn on Enable on desktop & panels (DESKTOP_SCROLL = true) if you want it there too.

Install

Fedora / RPM distros

./packaging/fedora/build-rpm.sh
sudo dnf install ./dist/midscroll-*.noarch.rpm

Debian / Ubuntu

./packaging/debian/build-deb.sh
sudo apt install ./dist/midscroll_*_all.deb

Needs a release with gtk4-layer-shell packaged (Debian 13 "trixie"

Description

FOSS Middle Mouse Scroll replacement for Linux

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482