@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 的新型桌面合成器,通过可滚动平铺布局避免传统窗口拥挤问题,并支持动态工作区、多显示器独立管理及自定义着色器动画等特性。
@geekbb: 好东西,为 Ghostty 终端提供一个 macOS 侧边栏工具,快速创建、切换和排列终端会话。 通过 Ghostty AppleScript 和 Accessibility API 操控丝滑窗口,可以从浮动面板直接跳到某个会话所在的 S…
Rig 是一个为 Ghostty 终端开发的 macOS 侧边栏辅助工具,支持通过 AppleScript 和辅助功能 API 快速创建、切换和排列终端会话窗口。
@VincentLogic: 发现个字节开源的桌面 AI 神器! UI-TARS Desktop,31k stars 不是吹的,这玩意儿真能看懂你的屏幕,然后帮你自动操作电脑。 你告诉它"帮我把 VS Code 的自动保存打开,延迟改成 500 毫秒",它就自己: -…
字节跳动开源的桌面 AI 自动化工具 UI-TARS Desktop 支持本地运行与屏幕视觉理解,可通过自然语言指令自主操控电脑完成日常任务。
@libapi_: Hermes Web UI v0.5.15 发布。 这版重点不是“多一个功能”,而是把真实使用里的阻塞继续清掉: 1. 新增看板面板,任务和会话可视化管理 2. 移动端布局优化,群聊和页面标题更稳 3. 修复动态端口、WSL 监听、Mar…
Hermes Web UI v0.5.15发布,新增看板面板用于任务和会话可视化管理,优化移动端布局,并修复动态端口、WSL监听和Markdown媒体同步等问题。该项目为开源自托管的Web UI工具。
@berryxia: 兄弟们! 不要重复造轮子,直接拿这个31.4K Star的开源来干吧! 字节跳动把 UI-TARS-desktop 开源了,看了一眼,这个项目已经上线快一年了! 目前 Star 数已经来到 31.4k,而且增长速度还挺稳。 24 小时增长…
ByteDance open-sourced UI-TARS-desktop, a native desktop GUI agent with 31.4k GitHub stars that uses vision models to control local or remote applications via natural language. The tool runs locally for privacy, supports Windows and macOS, and includes a CLI with streaming output for developers.