Skip to main content
SuperCmd includes a comprehensive window management system that lets you position and resize windows using keyboard shortcuts, similar to Rectangle or Magnet.

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

1

Open Window Manager

Press SuperCmd hotkey, then search for “Window Management” or use the dedicated hotkey (configure in Settings).
2

Select Layout

Browse layout presets with arrow keys or type to search (e.g., “left”, “center”).
3

Preview Layout

Press Shift+Enter to preview the layout without closing the panel.
4

Apply Layout

Press Enter to apply the layout and close the panel.

Layout Presets

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
Two-Thirds:
  • 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
Three-Fourths:
  • 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 Row:
  • 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)

Position Adjustments

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

  1. Detects all windows on current screen
  2. Filters out system windows and minimized windows
  3. Sorts by position (top to bottom, left to right)
  4. Arranges up to 4 windows in optimal grid

Layout Strategies (src/renderer/src/WindowManagerPanel.tsx:1027)

Auto-organize is smart about window sizes. It preserves aspect ratios and minimum dimensions to keep windows usable.

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:
  1. Explicitly targeted - From Window Management context
  2. Active window - Frontmost application window
  3. Nearest window - Closest to layout region center (for auto-organize)

Visual Preview

Preview layouts before applying (src/renderer/src/WindowManagerPanel.tsx:1331):

Preview Mode

  1. Navigate to a preset
  2. Press Shift+Enter
  3. Window outline appears showing future position
  4. Press Enter to apply or Escape to cancel
Preview mode temporarily moves windows. Use sparingly on critical workflows.

Keyboard Shortcuts

Assign custom shortcuts to presets:

Setting Shortcuts

  1. Settings > Hotkeys
  2. Find “Window Management” section
  3. Click preset (e.g., “Left Half”)
  4. Press desired key combination
  5. Shortcut saves automatically

Preset Command IDs (src/renderer/src/WindowManagerPanel.tsx:84)

Common shortcuts:
  • Ctrl+Cmd+Left - Left half
  • Ctrl+Cmd+Right - Right half
  • Ctrl+Cmd+F - Fill screen

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

1

Grant Permission

macOS requires Accessibility permission for window control.
2

System Settings

System Settings > Privacy & Security > Accessibility
3

Enable SuperCmd

Check the box next to SuperCmd in the app list.
4

Restart if Needed

Restart SuperCmd after granting permission.
Without Accessibility permission, window management features will not work.

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

Prevents windows from becoming too small to use.

Troubleshooting

  1. Check Accessibility permission (System Settings)
  2. Ensure window is not fullscreen
  3. Try a different window
  4. Restart SuperCmd
  • Activate the target window first
  • Use Window Management panel to explicitly select
  • Check for hidden or minimized windows
  • Verify screen resolution detection
  • Check for non-standard DPI scaling
  • Try simpler layouts (halves instead of sixths)
  • 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):
This prevents visual glitches and ensures smooth animations.

Window Inventory Caching

Window lists are cached briefly to reduce system calls:

Platform Support

Linux support depends on window manager. Tested on GNOME and KDE.