Overview
The preview window provides visual feedback showing where your window will be positioned before you commit to the action. This helps you make precise adjustments and avoid unwanted window placements. The preview appears as a translucent outline at the target position, updating in real-time as you move your cursor or change your selection in the radial menu.How It Works
The preview window is a borderless, non-activating panel that overlays your screen:Loop/Window Action Indicators/Preview Window/PreviewController.swift
Key Properties
- Non-activating: Doesn’t steal focus from your active window
- Mouse-transparent: Clicks pass through to windows beneath
- Multi-space: Appears on all spaces and displays
- Below radial menu: Rendered at a lower level for proper visual layering
When Preview Appears
The preview window automatically displays when:Radial menu is active
Holding the trigger key and moving your cursor shows a preview at the target position
Using keyboard shortcuts
Pressing a keybind (if preview is enabled) shows where the window will move
Even if you disable preview for keyboard shortcuts, window snapping will still use the preview system.
Configuration Options
Navigate to Settings > Theming > Preview to customize appearance:Basic Settings
Enable or disable the preview window. When disabled, windows move directly without visual feedback (snapping still shows previews).
Space between the preview border and the actual content area (0-20 pixels). Useful for visual clarity.
Border Customization
Thickness of the preview outline (0-10 pixels). Set to 0 for a borderless preview.
Corner Radius
Corner radius behavior varies by macOS version:When enabled, Loop reads the target window’s actual corner radius and applies it to the preview. Falls back to the default corner radius if unavailable.
Roundness of preview corners (0-25 pixels). On macOS 16+, this serves as the default when window corner radius is unavailable.
Background Customization
Add a blur effect to the preview background for better visibility against complex wallpapers.
Transparency of the preview fill color (0-100%). Higher values make the preview more opaque.
Implementation Details
Screen Switching
The preview automatically moves to the correct screen:Context Updates
The preview view model receives context updates containing:- Target frame position and size
- Current screen information
- Active window action
- Screen switch status
Close Animation
The preview fades out gracefully:Preview in Different Contexts
Radial Menu Preview
As you move your cursor around the radial menu:- Loop calculates the target frame based on cursor angle and distance
- Preview updates in real-time to show the new position
- Color and border adapt to match the selected action type
Keyboard Shortcut Preview
When triggering actions via keyboard:- Preview appears instantly at the target location
- Remains visible briefly (configurable duration)
- Window moves to match preview position when you release the trigger
If trigger delay is enabled, the preview appears after the delay period.
Window Snapping Preview
During drag-to-snap operations:- Preview appears when window approaches screen edges
- Shows snap zones (halves, quarters, etc.)
- Updates as you drag to different edge regions
- Window snaps to previewed position on release
Visual Customization Examples
Minimal Preview
For a clean, minimal look:- Padding: 0px
- Border thickness: 2px
- Corner radius: 0px
- Enable blur: Off
- Accent opacity: 20%
High Visibility Preview
For maximum clarity:- Padding: 8px
- Border thickness: 6px
- Corner radius: 12px
- Enable blur: On
- Accent opacity: 50%
Matching Window Style (macOS 16+)
For native appearance:- Prioritize window corner radius: On
- Default corner radius: 10px
- Border thickness: 4px
- Enable blur: On
- Accent opacity: 30%
Settings Preview Mode
The preview system integrates with Loop’s settings interface:- Select a keybind in settings
- Adjust radial menu actions
- Configure custom window sizes
Performance Considerations
The preview system is optimized for performance:Efficient Rendering
- SwiftUI-based view with minimal overhead
- Only updates when context changes
- Reuses existing window when possible
Screen Management
Level Management
Preview appears just below the radial menu:Disabling Preview
To disable preview while keeping other Loop features:Accessibility
The preview window is designed with accessibility in mind:- Non-intrusive: Doesn’t block interaction with other windows
- Customizable contrast: Adjustable opacity and border thickness
- Optional blur: Improves visibility against busy backgrounds
- VoiceOver compatible: Preview state changes are announced
Best Practices
Choose appropriate opacity
Choose appropriate opacity
Higher opacity (40-60%) for busy wallpapers, lower (20-30%) for minimal distractions.
Match your workflow
Match your workflow
Disable preview if you prefer fast, direct window manipulation. Keep it enabled while learning Loop.
Use blur selectively
Use blur selectively
Enable blur if your wallpaper makes the preview hard to see, but note it adds slight overhead.
Coordinate with radial menu
Coordinate with radial menu