- Pixie is a macOS window management tool written in Rust.
- Features a leader key system for keyboard-driven window management with multi-window support.
- Includes a GPUI-based window picker for multi-window tiling and search.
- Includes window manipulation actions: minimize, maximize, fullscreen, center, and monitor movement.
- Main entrypoint:
src/main.rs. - Accessibility/window logic:
src/accessibility.rsandsrc/window.rs. - Leader key state machine:
src/leader_mode.rs. - Event-tap + leader input routing:
src/event_tap.rs. - Window picker UI:
src/ui/window_picker.rs. - Notification system:
src/notification.rs. - Configuration:
src/config.rsdefines theActionenum and parses keybinds.
- Run tests:
cargo test - Run app locally:
cargo run - Build release binary:
cargo build --release - Build app bundle:
cargo bundle --release
- Uses
cargo-bundlefor app bundling (install withjust install-bundlerorcargo install cargo-bundle). - Bundle configuration is in
Cargo.tomlunder[package.metadata.bundle]. - Custom Info.plist entries (LSUIElement, NSAppleEventsUsageDescription) are in
Info.plist.ext. - Build/sign via Just:
- Ad-hoc signing (default):
just signed-app - Explicit identity:
just signed-app identity="Developer ID Application: Your Name (TEAMID)"
- Ad-hoc signing (default):
- Output bundle:
dist/Pixie.app
gpuifor the window picker UI.- CoreGraphics event tap + Accessibility APIs for global key handling and window control.
- Keep changes minimal and focused.
- Preserve existing CLI behavior unless explicitly requested.
- If changing Accessibility behavior, verify with runtime testing on macOS.
- Leader key state machine is implemented in
leader_mode.rswith states: Idle, Listening. - Global key handling is done via an event tap (
event_tap.rs) and routed into UI actions inmain.rs. - Multi-window storage uses
HashMap<char, SavedWindow>for saving/focusing windows by slot key. - Persistence file:
saved_windows.jsonin the user's config directory. - Notification system uses
osascriptto display macOS notifications. - The
Actionenum inconfig.rsdefines all available actions: focus_, minimize, maximize, fullscreen, center, move_monitor_, tile, select, Place(String). - Window manipulation functions are in
accessibility.rs:minimize_window,maximize_window,toggle_fullscreen,center_window,apply_placement. - The
Placementstruct and builtin placements are defined inconfig.rs. - Monitor movement functions in
accessibility.rs:move_window_to_monitor,get_all_screens, andScreenstruct for monitor detection. - Move monitor logic preserves relative window position by calculating percentage-based coordinates across screens.
- Window picker behavior:
- Triggered by the
tileandselectactions. - Lists current-monitor windows first, then other/minimized windows with a separator.
- Supports vim-style search (
/, thenn/Nnavigation). - Auto-dismisses when the picker loses focus.
- Triggered by the