Releases: gnhen/midscroll
Release list
midscroll v1.13
Choose which devices count as a mouse
midscroll picks up ordinary mice on its own. When it gets one wrong, you can now
correct it. The settings GUI lists your input devices with a switch each, so you
can add something it didn't recognise (a trackball, a receiver's second
interface, an odd HID collection) or tell it to leave one of your mice alone.
The same control is in the config file and on the command line:
EXTRA_DEVICES = /dev/input/by-id/usb-Kensington_Expert-event-mouse
IGNORE_DEVICES = 046d:c548
Each entry is a /dev/input path (the by-id and by-path links are the ones
that survive a reboot), a hex vendor:product, or part of the device name.
IGNORE_DEVICES wins over EXTRA_DEVICES. To see every device with its
identifier and what midscroll does with it:
sudo midscroll --list-devices
Per run, --extra-device SPEC and --ignore-device SPEC do the same and are
repeatable.
Keyboards are refused even when you list one, because that would have a root
daemon reading every key on them, and they would lose key repeat and their LEDs
passing through the virtual mirror. Turning that off takes a root edit of
/etc/midscroll.conf (ALLOW_KEYBOARDS = true); the settings GUI deliberately
cannot do it.
A ghost cursor while you drag
The badge now stays locked at the point where you pressed, and a ghost cursor
follows your hand from there, the way Windows autoscroll looks. The ghost is a
copy of your own pointer, read from your cursor theme at the size the compositor
would use, drawn at 85% opacity so you can tell the two apart.
The real pointer stays pinned, which is what keeps the scroll locked to the
window you started in: the ghost only draws, and cannot click, hover or focus
anything. GHOST_CURSOR turns it off and GHOST_SCALE changes how far it
travels per unit of mouse motion.
This is drawn on KDE Plasma Wayland only, as the badge always has been.
Scrolling itself works everywhere, on Wayland and X11 alike.
Security
The config file now decides which devices a root daemon opens, and the state
socket now carries cursor motion, so both got tightened:
- the config is only read when root owns it and nobody else can write it, and
that includes--config, so a user-writable file cannot steer the daemon - midscroll's own virtual devices and keyboard-class devices are refused before
the device lists are consulted, so no config entry can reach either - device specs are bounded and never opened, only compared against devices the
daemon already found, and at most 16 devices are grabbed at once - the state socket caps clients (16 overall, 4 per user), bounds what it reads,
drops clients that stop reading, and sends cursor offsets only to the session
currently in front of the screen - the full-screen overlay re-applies its click-through region every time it is
shown and again every second, and takes itself down if the daemon goes quiet - the daemon now runs with no capabilities at all, and gained
ProtectProc,
ProcSubset,ProtectKernelModules,IPAddressDeny,UMask,MemoryMax
andTasksMax. Itssystemd-analyze securityexposure went from 4.1 to 1.3 - every Apply in the settings GUI authenticates, instead of reusing a cached
authorization for five minutes, and inactive sessions are refused
The new SECURITY.md documents what each part trusts and why, so you can check
the claims against the code rather than take them on faith.
Upgrading
If you remove and reinstall the package rather than upgrading in place, the
session helper stays stopped, and you get no badge and no ghost cursor until it
runs again:
systemctl --user daemon-reload
systemctl --user restart midscroll-overlay
Logging out and back in does the same thing. /etc/midscroll.conf is kept as it
is; the new keys fall back to their defaults until you set them.
midscroll v1.12
Feature release adding a toggle for whether midscroll runs on the desktop and
panels, off by default so a middle-drag can no longer hijack the desktop.
Added
- Desktop & panels toggle (
DESKTOP_SCROLL). By default midscroll now
pauses while a desktop shell is focused, so a middle-drag over the desktop or
a panel no longer hijacks it (on KDE it used to switch virtual desktops); the
middle button behaves natively there instead. Coversplasmashell,
nemo-desktop,xfdesktop,waybar,xfce4-panel, and GNOME Shell
(org.gnome.shell/gjs). Turn it on with Enable on desktop & panels in
the settings GUI,DESKTOP_SCROLL = truein the config, or--desktopon the
command line. Kept separate from the app blacklist, so your custom entries
stay clean.
Notes
- Off by default; existing setups gain the desktop/panel pause automatically on
upgrade, with no config change needed. - Packaging bumped for Fedora (RPM), Debian (deb), and Arch (PKGBUILD).
Full changelog: v1.11...v1.12
midscroll v1.11
Feature release adding a settings GUI and a click-to-toggle scroll mode, plus
security hardening across the daemon and session helper. Toggle mode was
requested in #1 by @ionburger.
Added
- Settings GUI (
midscroll-settings). A GTK4 window to change every
tunable - speed, dead zone, event rate, natural scrolling, the app blacklist
and the new toggle mode - with no terminal or config editing. Changes are
written by a small privileged helper (midscroll-apply) through pkexec,
which restarts the daemon so they take effect immediately. - Toggle mode (
TOGGLE_MODE). Click the middle button once to start
autoscroll and again - or any click - to stop it (Windows-Explorer / Firefox
style) instead of holding and dragging. Off by default; enable it in the GUI
or the config. Requested in #1 by @ionburger. - Themed app icon. The scroll-arrows badge artwork now doubles as the
settings app icon, so the launcher and Wayland window icon match the badge.
Security
- Sandboxed the daemon and the session helper. The overlay now runs with
NoNewPrivileges,ProtectSystem, and kernel/clock/namespace
with a restricted address-family set; the daemon gained a syscall filter
(@system-service,EPERM) andMemoryDenyWriteExecute. - Bounded the one input crossing the pkexec boundary. The blacklist value
passed tomidscroll-applyis now stripped of anything that is
plausible window-class character and length-capped, so it can't mangle the
config or carry a malformed payload. - Shipped a polkit policy for
midscroll-apply(auth_admin_keep), so
applying settings uses a scoped, briefly-cached authorization i
generic full-admin auth. - Hardened self-recognition. The daemon refuses to grab its o
mirrors even if the phys marker fails, and warns at startup if the marker
doesn't round-trip - closing a hotplug window that could feed r
back on itself.
Fixed
- Scroll badge and app blacklist under the new sandbox. kdoto
real, shared, writable/tmpto hand KWin its script; the overlay now uses
ProtectSystem=full(notstrict) and noPrivateTmp, which
broken the badge and focus reporting. - Settings window height. The window now opens tall enough to
control, capped to the monitor height so it never runs off a small screen.
Notes
- Middle-drag remains hold-and-drag by default; toggle mode is op
- You are encouraged to review the source yourself - it runs as root at the
input layer. See the Security section of the README. - Packaging bumped for Fedora (RPM), Debian (deb), and Arch (PKGBUILD).
Full changelog: v1.6...v1.11
midscroll v1.6
Bug-fix release resolving the pointer-speed reset reported in #1 by @ionburger.
Fixed
- Pointer speed / acceleration no longer reset when midscroll starts. Each mouse is now re-emitted through its own uinput mirror that copies the source mouse's name and vendor/product IDs, so libinput/KDE keep applying that mouse's own per-device settings instead of falling back to defaults. Previously every mouse was funneled through a single anonymous virtual pointer, which is why configured speeds appeared to reset.
- Keyboards are no longer grabbed. Device matching now requires both
REL_XandREL_Y, so a keyboard exposing a stray pointer capability through its media keys (e.g. the Razer BlackWidow in the issue logs) is left alone.
Notes
- Middle-drag is still hold-and-drag by design (press the wheel and drag to scroll; a quick click passes through as a normal middle click). An optional click-to-toggle mode may come in a later release.
- Packaging bumped to 1.6 for Fedora (RPM), Debian (deb), and Arch (PKGBUILD).
Full changelog: v1.5...v1.6
midscroll v1.5
Security and correctness fixes.
- State socket now checks peer credentials (SO_PEERCRED) and only trusts
focus reports from a logged-in user, so a stray local process can't
pause the daemon. - Focus tracked per helper: a second session or a stale helper exiting no
longer wipes the live one's focus. - App blacklist enforced during a drag, not just at press time, so
switching into a blacklisted app stops an in-progress scroll. - Resync held buttons after dropped kernel events so a button can't stick.
- Scroll ticks timed by the monotonic clock, so speed holds under load.
- is_mouse no longer rejects mice that expose a stray absolute axis.
Install: RPM (Fedora) or .deb (Debian/Ubuntu) below.
midscroll 1.3
First public release.
Hold the middle mouse button and drag to scroll, like Windows 10/11. Works in every app on Wayland and X11 (kernel-level evdev/uinput daemon), with Chromium's autoscroll speed curve, cursor anchoring, and a scroll badge at the cursor on KDE Plasma.
Install
- Fedora / RPM distros:
sudo dnf install ./midscroll-1.3-1.fc44.noarch.rpm - Debian 13+ / Ubuntu 24.04+:
sudo apt install ./midscroll_1.3-1_all.deb(the scroll badge additionally needs kdotool, not packaged there yet; scrolling works without it) - Arch: clone the repo and
makepkg -siinpackaging/arch/
Tuning and details in the README.