midscroll 是一个 Linux 守护进程,通过在内核输入层(evdev/uinput)工作,为整个系统提供 Windows 风格的中键拖拽自动滚动,支持 Wayland 和 X11,不依赖任何特定桌面或工具包。

Stars

166

7 天增长

暂无数据

Fork 数

3

开放 Issue

2

开源协议

Unlicense

最近更新

2026-07-27

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它在输入层精确复制了 Windows 的自动滚动行为(包括 Chromium 的速度公式),可在任何桌面的所有应用中运行,配有 GTK 设置界面,并且代码小巧、依赖少,具有强大的安全沙箱设计。

适合谁使用

  • 怀念 Windows 10/11 自动滚动的 Linux 用户
  • 希望获得系统级滚动控制的进阶用户
  • 想要研究 evdev/uinput 自动滚动实现的开发者
  • 需要桌面无关滚动工具的 Wayland 用户

典型使用场景

  • 按住中键拖拽滚动长篇网页或文档
  • 通过斜向拖拽平移宽页面或电子表格
  • 使用切换模式(点击开始/停止)实现 Firefox 或资源管理器风格的自动滚动
  • 为不原生支持中键拖拽的应用添加自动滚动功能

项目优势

  • 在内核输入层工作,无需桌面集成即可在 Wayland 和 X11 上表现一致
  • 采用 Chromium/Edge 在 Windows 上的确切自动滚动速度公式,提供熟悉手感
  • 配有 GTK 设置界面,通过滑块和开关轻松调节所有参数
  • 守护进程和覆盖服务均通过 systemd 安全功能进行沙箱隔离,鼓励代码审查

使用前须知

  • 滚动徽章和幽灵光标覆盖仅适用于 KDE Plasma(Wayland),其他桌面无视觉指示
  • 应用黑名单在切换窗口时有约 1 秒延迟,可能导致短暂的非预期滚动
  • 需要 root 权限运行守护进程和系统配置,可能让部分用户却步;不支持 Flatpak 安装

README 快速开始

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"

项目描述

FOSS Middle Mouse Scroll replacement for Linux

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

lopopolo
精选
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 与机器学习AI 智能体
2,390
slvDev
精选
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 与机器学习大语言模型
1,960
littledivy
精选
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 与机器学习
1,482