Overview
Window management in SuperCmd provides:- 45+ layout presets (halves, thirds, quarters, sixths, center, fill)
- Fine-tuning controls (resize by 10%, move in increments)
- Auto-organize multiple windows in grid layouts
- Visual preview before applying layouts
- Keyboard-first workflow
Window management uses the
node-window-manager library to interact with native window APIs (src/main/window-manager-worker.ts).Quick Start
Open Window Manager
Press SuperCmd hotkey, then search for “Window Management” or use the dedicated hotkey (configure in Settings).
Layout Presets
Halves & Quarters
- Halves
- Quarters
- Left - Left half of screen
- Right - Right half
- Top - Top half
- Bottom - Bottom half
Thirds
Vertical Thirds:- First Third - Left third
- Center Third - Middle third
- Last Third - Right third
- First Two Thirds - Left 2/3
- Center Two Thirds - Middle 2/3
- Last Two Thirds - Right 2/3
Fourths
Vertical Fourths:- First Fourth - Leftmost quarter
- Second Fourth - Left-center quarter
- Third Fourth - Right-center quarter
- Last Fourth - Rightmost quarter
- First Three Fourths - Left 3/4
- Center Three Fourths - Middle 3/4
- Last Three Fourths - Right 3/4
Sixths (2×3 Grid)
Top Row:- Top Left Sixth
- Top Center Sixth
- Top Right Sixth
- Bottom Left Sixth
- Bottom Center Sixth
- Bottom Right Sixth
Special Layouts
Center
Center window at 60% screen size
Almost Maximize
Center at 80% (leaves margins)
Maximize
Fill entire screen
Auto-Organize
Arrange up to 4 windows in smart grid
Fine-Tuning Controls
Adjust window size and position incrementally:Size Adjustments (10% Steps)
| Action | Shortcut Preset |
|---|---|
| Increase Size | increase-size-10 |
| Decrease Size | decrease-size-10 |
| Expand Left | increase-left-10 |
| Expand Right | increase-right-10 |
| Expand Top | increase-top-10 |
| Expand Bottom | increase-bottom-10 |
| Shrink Left | decrease-left-10 |
| Shrink Right | decrease-right-10 |
| Shrink Top | decrease-top-10 |
| Shrink Bottom | decrease-bottom-10 |
Position Adjustments
| Action | Shortcut Preset |
|---|---|
| Move Up | move-up-10 |
| Move Down | move-down-10 |
| Move Left | move-left-10 |
| Move Right | move-right-10 |
Fine-tuning presets require
Shift+Enter to prevent accidental activation. They adjust the active window by 10% of its current size.Auto-Organize
Arrange multiple windows automatically:How It Works
- Detects all windows on current screen
- Filters out system windows and minimized windows
- Sorts by position (top to bottom, left to right)
- Arranges up to 4 windows in optimal grid
Layout Strategies (src/renderer/src/WindowManagerPanel.tsx:1027)
Window Detection
Manageable Windows
SuperCmd only manages windows that meet criteria (src/renderer/src/WindowManagerPanel.tsx:518):Target Window Selection
When applying a preset, SuperCmd selects the target window:- Explicitly targeted - From Window Management context
- Active window - Frontmost application window
- Nearest window - Closest to layout region center (for auto-organize)
Visual Preview
Preview layouts before applying (src/renderer/src/WindowManagerPanel.tsx:1331):Preview Mode
- Navigate to a preset
- Press
Shift+Enter - Window outline appears showing future position
- Press
Enterto apply orEscapeto cancel
Keyboard Shortcuts
Assign custom shortcuts to presets:Setting Shortcuts
- Settings > Hotkeys
- Find “Window Management” section
- Click preset (e.g., “Left Half”)
- Press desired key combination
- Shortcut saves automatically
Preset Command IDs (src/renderer/src/WindowManagerPanel.tsx:84)
Multi-Monitor Support
SuperCmd handles multi-monitor setups:Screen Detection
Layouts apply to the screen containing the target window:Work Area Calculation
Respects menu bars, docks, and taskbars:- macOS: Excludes menu bar (top) and Dock
- Windows: Excludes taskbar
- Linux: Respects panel reservations
Settings
Window Management Panel
Settings > General > Window Management:- Enable Window Management - Toggle feature on/off
- Show Preview - Enable/disable preview mode
- Execution Delay - Minimum time between operations (default: 14ms)
Accessibility Permissions
Advanced Features
Smart Grid Layouts
Auto-organize uses intelligent grid calculation (src/renderer/src/WindowManagerPanel.tsx:608):Window Size Hints
Preserves preferred window dimensions when possible:Minimum Window Constraints
Troubleshooting
Windows won't move
Windows won't move
- Check Accessibility permission (System Settings)
- Ensure window is not fullscreen
- Try a different window
- Restart SuperCmd
Wrong window selected
Wrong window selected
- Activate the target window first
- Use Window Management panel to explicitly select
- Check for hidden or minimized windows
Layouts don't fit screen
Layouts don't fit screen
- Verify screen resolution detection
- Check for non-standard DPI scaling
- Try simpler layouts (halves instead of sixths)
Auto-organize arranges wrong windows
Auto-organize arranges wrong windows
- Minimize windows you don’t want arranged
- Close unnecessary windows
- Manually position first, then fine-tune
Best Practices
Use Consistent Shortcuts
Assign keyboard shortcuts to your most-used presets
Preview First
Use Shift+Enter to preview complex layouts
Start Simple
Master halves and quarters before using sixths
Combine Presets
Apply preset, then fine-tune with 10% adjustments
Performance
Execution Throttling
Prevents rapid successive operations (src/renderer/src/WindowManagerPanel.tsx:206):Window Inventory Caching
Window lists are cached briefly to reduce system calls:Platform Support
| Platform | Support Level | Notes |
|---|---|---|
| macOS | Full | Native window APIs |
| Windows | Full | Win32 APIs |
| Linux | Partial | X11/Wayland varies |
Linux support depends on window manager. Tested on GNOME and KDE.