@wsl8297: 在 Mac 上干活,一开就是十几个窗口。要在一堆窗口里把目标翻出来,经常比做事本身还费劲。 最近刷到 Paneru 这款开源窗口管理器,思路很直:用横向“滚动条”来管窗口,窗口切换一下变得有序、好找。 它有点像 Linux 上的 Niri…
摘要
Paneru 是一款针对 macOS 的开源平铺式窗口管理器,采用独特的水平滚动条布局,旨在解决多窗口管理混乱的问题,灵感来源于 Linux 上的 Niri。
查看缓存全文
缓存时间: 2026/05/10 20:32
在 Mac 上干活,一开就是十几个窗口。要在一堆窗口里把目标翻出来,经常比做事本身还费劲。 最近刷到 Paneru 这款开源窗口管理器,思路很直:用横向“滚动条”来管窗口,窗口切换一下变得有序、好找。 它有点像 Linux 上的 Niri:每块显示器各自一条窗口带,互不打扰;配合触控板手势滑动窗口,操作顺滑、很自然。 GitHub:http://github.com/karinushka/paneru… 功能也够实用:预设宽度一键调整、窗口堆叠、焦点跟随鼠标等;配置文件支持热重载,键位改完立刻生效,不用重启。 不想让大屏把窗口拉得稀碎,或想在笔记本上少点全屏来回切换,这个项目值得试试。
karinushka/paneru
Source: https://github.com/karinushka/paneru
A sliding, tiling window manager for MacOS.
About
Paneru is a MacOS window manager that arranges windows on an infinite strip, extending to the right. A core principle is that opening a new window will never cause existing windows to resize, maintaining your layout stability.
Each monitor operates with its own independent window strip, ensuring that windows remain confined to their respective displays and do not “overflow” onto adjacent monitors.
Why Paneru?
- Niri-like Behavior on MacOS: Inspired by the user experience of Niri, Paneru aims to bring a similar scrollable tiling workflow to MacOS.
- Works with MacOS workspaces: You can use existing workspaces and switch between them with keyboard or touchpad gestures - with a separate window strip on each. Drag and dropping windows between them works as well.
- Virtual Workspaces (Experimental): Group your windows into tasks by stacking multiple horizontal strips (rows) within a single space. Use native macOS workspaces for broad segregation (e.g., ‘Work’, ‘Personal’) and virtual workspaces to stay organized within each context.
- Focus follows mouse on MacOS: Very useful for people who would like to avoid an extra click.
- Sliding windows with touchpad: Using a touchpad is quite natural for navigation of the window pane.
- Native macOS tabs support: Applications like Ghostty use these, so Paneru manages them on the layout strip like other windows.
- Optimal for Large Displays: Standard tiling window managers can be suboptimal for large displays, often resulting in either huge maximized windows or numerous tiny, unusable windows. Paneru addresses this by providing a more flexible and practical arrangement.
- Improved Small Display Usability: On smaller displays (like laptops), traditional tiling can make windows too small to be productive, forcing users to constantly maximize. Paneru’s sliding strip approach aims to provide a better experience without this compromise.
Inspiration
The fundamental architecture and window management techniques are heavily inspired by Yabai, another excellent MacOS window manager. Studying its source code has provided invaluable insights into managing windows on MacOS, particularly regarding undocumented functions.
The innovative concept of managing windows on a sliding strip is directly inspired by Niri and PaperWM.spoon.
Installation
Recommended System Options
-
Like all non-native window managers for MacOS, Paneru requires accessibility access to move windows. Once it runs you may get a dialog window asking for permissions. Otherwise check the setting in System Settings under “Privacy & Security -> Accessibility”.
-
Check your System Settings for “Displays have separate spaces” option. It should be enabled - this allows Paneru to manage the workspaces independently.
-
Multiple displays. Paneru is moving the windows off-screen, hiding them to the left or right. If you have multiple displays, for example your laptop open when docked to an external monitor you may experience weird behavior. The issue is that when MacOS notices a window being moved too far off-screen it will relocate it to a different display - which confuses Paneru! The solution is to change the spatial arrangement of your additional display - instead of having it to the left or right, move it above or below your main display. A similar situation exists with Aerospace window manager. An option exists (
horizontal_mouse_warp) which can make a vertical arrangement of displays “feel” horizontal. -
Off-screen window slivers. Because macOS will forcibly relocate windows that are moved fully off-screen, Paneru keeps a thin sliver of each off-screen window visible at the screen edge. The
sliver_widthandsliver_heightoptions control the size of this sliver. This is a workaround for a macOS limitation, not a design choice.
Installing from Crates.io
Paneru is built using Rust’s cargo. It can be installed directly from
crates.io or if you need the latest version, by fetching the source from Github.
$ cargo install paneru
Installing from Github
$ git clone https://github.com/karinushka/paneru.git
$ cd paneru
$ cargo build --release
$ cargo install --path .
It can run directly from the command line or as a service. Note that you will need to grant accessibility privileges to the binary.
Installing with Homebrew
If you are using Homebrew, you can install from the formula with:
$ brew install paneru
Or by first adding the tap and then installing by name:
$ brew tap karinushka/paneru
$ brew install paneru
Installing with Nix
See nix/README.md.
Configuration
Paneru checks for configuration in following locations:
$HOME/.paneru$HOME/.paneru.toml$XDG_CONFIG_HOME/paneru/paneru.toml
Additionally it allows overriding the location with $PANERU_CONFIG environment variable.
You can use the following basic configuration as a starting point. For a complete guide to all available options, keybindings, and window rules, see the Configuration Guide.
# basic .paneru.toml
[options]
focus_follows_mouse = true
mouse_follows_focus = true
[bindings]
window_focus_west = "cmd - h"
window_focus_east = "cmd - l"
window_resize = "alt - r"
window_center = "alt - c"
quit = "ctrl + alt - q"
Live reloading
Configuration changes made to your ~/.paneru file are automatically reloaded
while Paneru is running. This is useful for tweaking keyboard bindings and
other settings without restarting the application.
Running as a service
$ paneru install
$ paneru start
Running in the foreground
$ paneru
Sending Commands
Paneru exposes a send-cmd subcommand that lets you control the running
instance from the command line via a Unix socket (/tmp/paneru.socket). Any
command that can be bound to a hotkey can also be sent programmatically:
$ paneru send-cmd <command> [args...]
Available commands
| Command | Description |
|---|---|
window focus <direction> | Move focus to a window in the given direction |
window swap <direction> | Swap the focused window with a neighbour |
window center | Center the focused window on screen |
window resize | Cycle through preset_column_widths |
window grow | Grow to the next preset width |
window shrink | Shrink to the previous preset width |
window fullwidth | Toggle full-width mode for the focused window |
window manage | Toggle managed/floating state |
window equalize | Distribute equal heights in the focused stack |
window stack | Stack the focused window onto its left neighbour |
window unstack | Unstack the focused window into its own column |
window nextdisplay | Move the focused window to the next display |
window nextdisplaysend | Move the window to the next display but stay here |
window virtual <dir> | Switch to the previous/next virtual workspace |
window virtualmove <dir> | Move the window to a different virtual workspace |
window virtualsend <dir> | Send the window to a virtual workspace but stay |
window snap | Snap the focused window into the visible viewport |
mouse nextdisplay | Warp the mouse pointer to the next display |
printstate | Print the internal ECS state to the debug log |
quit | Quit Paneru |
Where <direction> is one of: west, east, north, south, first, last.
Examples
# Move focus one window to the right.
$ paneru send-cmd window focus east
# Swap the current window to the left.
$ paneru send-cmd window swap west
# Center and resize in one shot (two separate calls).
$ paneru send-cmd window center && paneru send-cmd window resize
# Cycle backward through preset widths.
$ paneru send-cmd window shrink
# Jump to the left-most window.
$ paneru send-cmd window focus first
Scripting ideas
Because send-cmd works over a Unix socket, you can drive Paneru from shell
scripts, cron jobs, or other automation tools:
- Launch-and-arrange workflow. Open an application and immediately position
it:
open -a Safari && sleep 0.5 && paneru send-cmd window resize. - One-key layout reset. Bind a script that focuses the first window, resizes it, then moves east and resizes the next one — recreating a preferred layout after windows get shuffled.
- Integration with other tools. Pipe focus events from tools like
Hammerspoon or
skhd into
paneru send-cmdfor compound actions that go beyond a single hotkey. - Multi-display orchestration. Move a window to the next display and
immediately warp the mouse there:
paneru send-cmd window nextdisplay && paneru send-cmd mouse nextdisplay
Future Enhancements
- More commands for manipulating windows: finegrained size adjustments, touchpad resizing, etc.
- Scriptability. For example using Lua for configuration or automation of window handling, like triggering and positioning specific windows or applications.
Communication
There is a public Matrix room
#paneru:matrix.org. Join and
ask any questions.
Architecture Overview
For a detailed high-level overview of Paneru’s internal design, data flow, and ECS patterns, please refer to the Architecture Guide.
Paneru’s architecture is built around the Bevy ECS (Entity Component System), which manages the window manager’s state as a collection of entities (displays, workspaces, applications, and windows) and components.
The system is decoupled into three primary layers:
- Platform Layer (
src/platform/): Directly interfaces with macOS viaobjc2and Core Graphics. It runs the native Cocoa event loop and pumps OS events into a channel consumed by Bevy. - Management Layer (
src/manager/): Defines OS-agnostic traits (WindowManagerApi,WindowApi) that abstract window manipulation. The macOS-specific implementations (WindowManagerOS,WindowOS) bridge these traits to the Accessibility and SkyLight APIs. - ECS Layer (
src/ecs/): The “brain” of the application. Bevy systems process incoming events, handle input triggers, and manage animations.
Repository Structure
mainbranch: Contains the stable, released code.testingbranch: Used for experimental features and architectural refactors. This branch is volatile and may be force-pushed.
Tile Scrollably Elsewhere
Here are some other projects which implement a similar workflow:
- Niri: a scrollable tiling Wayland compositor.
- PaperWM: scrollable tiling on top of GNOME Shell.
- karousel: scrollable tiling on top of KDE.
- papersway: scrollable tiling on top of sway/i3.
- hyprscroller and hyprslidr: scrollable tiling on top of Hyprland.
- PaperWM.spoon: scrollable tiling on top of MacOS.
相似文章
@wsl8297: 逛 GitHub 时挖到一个狠角色:niri。它直接绕开传统桌面“窗口一多就被挤变形”的老毛病,把窗口管理方式彻底重做了一遍。 niri 采用可滚动的平铺思路:窗口按列铺在一条“无限延伸”的水平条带上。你开新窗口,不会强行压缩现有窗口;多…
文章介绍了开源项目 niri,这是一款基于 Wayland 的新型桌面合成器,通过可滚动平铺布局避免传统窗口拥挤问题,并支持动态工作区、多显示器独立管理及自定义着色器动画等特性。
@LawrenceW_Zen: 推荐一个开源免费的Mac Menu Bar 管理工具,效果很好。Menu Bar 之前太多图标了,现在隐藏之后很舒服。
推荐一款开源免费的Mac Menu Bar管理工具,可隐藏过多图标,使界面更整洁。
@I00B6: 别急着给 Mac 软件续费/购买各种APP 最近发现一个开源菜单栏工具,几乎把一堆常用付费工具的功能全做进去了 音量控制、系统监控、窗口切换、文件暂存、应用卸载、防休眠…… 一个 App 全包,而且免费、开源、无广告、本地运行 开源生态现…
介绍一款开源Mac菜单栏工具Vorssaint,它整合了音量控制、系统监控、窗口切换等多项常见付费功能,免费无广告且本地运行。
@smurfs626: 百万熊文预定 试玩了一下,确实好几把方便的感觉 特别是像我这种一工作起来,就开四五六个窗口的,每个窗口干着不一样的东西,一多还会混乱 里面还内置了 workspace、多窗口分屏、任务通知、内置浏览器这些功能,如果是在实时 vide co…
用户推荐一个集成工作区、多窗口分屏、任务通知和内置浏览器的工具,适用于多任务视频编码场景,并推荐了@saccc_c的详细教程。
@Saccc_c: cmux终端—能让你的 cc 如 codex app 般丝滑 相比普通终端,cmux体验下来主要有4个优势: 1、多窗口、分屏管理方便。垂直标签用于任务分组,组内窗口支持拖拽排列。标签和窗口都支持重命名,你可以很清楚的知道每个页面正在跑什…
cmux终端工具提供多窗口分屏管理、任务进度通知、内置浏览器和快速恢复工作区等功能,提升终端使用体验。