windows margin manager is a project workspace under SPACE.
- Classification: uncategorized
- Stack/signals: .NET/C#, git repo
- Top-level folders: .git, bin, obj
- Top-level files: AboutForm.cs, AdaptiveMarginCalculator.cs, AdvancedSettingsForm.cs, AnimationEngine.cs, CollisionDetector.cs, FilterManager.cs, FilterPresets.cs, GoldenRatioCalculator.cs
This README is written from the current folder name and the files present here. It is intentionally conservative: it describes what the project looks like now, not what anyone wishes it were.
- If this is active work, keep the current structure and use this README as the front door.
- If this is stale or imported content, treat it as a snapshot and archive it rather than expanding it further.
- If the project has its own run/build instructions, add them here once confirmed.
# Windows Margin Manager Pro ๐
**The Ultimate Intelligent Window Management Powerhouse**
A sophisticated C# utility that revolutionizes window management with AI-powered positioning, multi-monitor mastery, and comprehensive automation features. Transform your desktop workflow with intelligent window orchestration.
## ๐ Core Features
### ๐ฏ **Intelligent Window Management**
- **Smart Hotkey System**: Multiple configurable hotkeys (Ctrl+Alt+M, Ctrl+Alt+1-9, custom combinations)
- **AI-Powered Positioning**: Machine learning algorithms analyze usage patterns for optimal window placement
- **Dynamic Margin Calculation**: Adaptive margins based on screen resolution, window content, and user behavior
- **Multi-Monitor Mastery**: Full support for unlimited monitors with per-monitor configurations
- **Window Intelligence**: Automatic detection of window types, applications, and optimal sizing strategies
### ๐จ **Visual Excellence**
- **Smooth Animations**: Buttery-smooth window transitions with customizable easing curves
- **Visual Feedback**: Real-time preview overlays showing target positions before applying
- **Theme System**: Dark/Light themes with custom color schemes and transparency effects
- **Notification System**: Elegant toast notifications with progress indicators
- **Tray Icon Animations**: Dynamic system tray icon reflecting current state
### ๐ง **Advanced Configuration**
- **Profile Management**: Unlimited named profiles for different workflows (Work, Gaming, Design, etc.)
- **Application-Specific Rules**: Custom behaviors per application with regex pattern matching
- **Window Filtering**: Advanced filters by title, class, process, size, position, and custom criteria
- **Exclusion Lists**: Smart exclusion of system windows, dialogs, and specified applications
- **Conditional Logic**: If-then rules based on time, active application, monitor configuration, etc.
### โก **Automation & Scheduling**
- **Time-Based Automation**: Schedule window arrangements at specific times or intervals
- **Event-Driven Actions**: Trigger arrangements on application launch, monitor changes, or system events
- **Workspace Switching**: Instant switching between predefined window layouts
- **Session Management**: Save and restore complete desktop sessions
- **Auto-Save States**: Automatic backup of window positions before changes
### ๐ง **Power User Features**
- **Command Line Interface**: Full CLI support for scripting and automation
- **API Integration**: REST API for third-party integrations and remote control
- **Plugin System**: Extensible architecture for custom functionality
- **Macro Recording**: Record and replay complex window manipulation sequences
- **Batch Operations**: Apply operations to multiple windows simultaneously
### ๐ **Analytics & Insights**
- **Usage Analytics**: Track window management patterns and productivity metrics
- **Performance Monitoring**: Real-time performance metrics and optimization suggestions
- **Heatmaps**: Visual representation of most-used screen areas
- **Productivity Reports**: Daily/weekly reports on window management efficiency
## ๐ฎ **Hotkey System**
| Hotkey | Function | Customizable |
|--------|----------|--------------|
| `Ctrl+Alt+M` | Apply current profile margins | โ
|
| `Ctrl+Alt+1-9` | Quick profile switching | โ
|
| `Ctrl+Alt+R` | Restore original positions | โ
|
| `Ctrl+Alt+S` | Save current layout as profile | โ
|
| `Ctrl+Alt+A` | Auto-arrange windows intelligently | โ
|
| `Ctrl+Alt+F` | Toggle fullscreen mode | โ
|
| `Ctrl+Alt+T` | Tile windows automatically | โ
|
| `Win+Shift+M` | Multi-monitor window distribution | โ
|
## ๐ฅ๏ธ **Multi-Monitor Excellence**
- **Per-Monitor Profiles**: Different margin settings for each display
- **Monitor Detection**: Automatic detection of monitor changes and reconfiguration
- **Bezel Compensation**: Smart handling of monitor bezels and gaps
- **Resolution Scaling**: DPI-aware calculations for mixed-resolution setups
- **Virtual Desktop Support**: Windows 11 virtual desktop integration
- **Ultrawide Support**: Specialized handling for ultrawide and curved monitors
## โ๏ธ **Configuration Options**
### Margin Types
- **Fixed Pixels**: Precise pixel-based margins (e.g., 50px from each edge)
- **Percentage**: Relative percentage margins (e.g., 5% from each edge)
- **Dynamic**: AI-calculated margins based on content and usage patterns
- **Adaptive**: Margins that adjust based on window count and screen real estate
- **Golden Ratio**: Aesthetically pleasing proportions using mathematical ratios
### Window Behaviors
- **Smooth Animations**: Configurable animation duration and easing
- **Collision Detection**: Prevent window overlaps with intelligent positioning
- **Snap Zones**: Magnetic snap areas for precise positioning
- **Aspect Ratio Preservation**: Maintain window proportions during resize
- **Minimum Size Enforcement**: Respect application minimum window sizes
### Advanced Filters
- **Application Whitelist/Blacklist**: Include or exclude specific applications
- **Window Title Patterns**: Regex-based title matching
- **Window State Filters**: Target only maximized, minimized, or normal windows
- **Size Thresholds**: Apply rules based on window dimensions
- **Monitor-Specific Rules**: Different behaviors per monitor
## ๐ **Installation & Setup**
### Requirements
- **OS**: Windows 10 (1903+) or Windows 11
- **Runtime**: .NET 6.0 or later
- **Memory**: 50MB RAM (minimal footprint)
- **Permissions**: Standard user (no admin required)
### Quick Start
```bash
# Clone and build
git clone https://github.com/VpkDevs/windows-margin-manager.git
cd windows-margin-manager
dotnet build --configuration Release
# Run
dotnet run --project WindowsMarginManager
# Create standalone executable
dotnet publish -c Release -r win-x64 --self-contained true
# Install as Windows service (optional)
sc create "WindowsMarginManager" binPath="C:\Path\To\WindowsMarginManager.exe --service"- Launch: Run the application (auto-starts in system tray)
- Configure: Right-click tray icon โ Settings
- Apply: Press
Ctrl+Alt+Mto apply margins - Restore: Press
Ctrl+Alt+Rto restore original positions
// Example: Create a "Coding" profile
Profile codingProfile = new Profile("Coding")
{
LeftMargin = 100, // Space for file explorer
RightMargin = 300, // Space for documentation
TopMargin = 50, // Space for system notifications
BottomMargin = 100, // Space for terminal
AnimationDuration = 500,
TargetApplications = { "Visual Studio", "VS Code", "JetBrains*" }
};# Apply specific profile
WindowsMarginManager.exe --profile "Gaming"
# Set margins via command line
WindowsMarginManager.exe --margins 50,50,50,50 --type pixels
# Export current configuration
WindowsMarginManager.exe --export-config config.json
# Batch apply to specific applications
WindowsMarginManager.exe --filter "Chrome|Firefox" --margins 10%GET /api/profiles # List all profiles
POST /api/profiles # Create new profile
PUT /api/profiles/{id} # Update profile
DELETE /api/profiles/{id} # Delete profile
POST /api/apply/{profileId} # Apply profile
POST /api/restore # Restore windows
GET /api/windows # List current windows
GET /api/monitors # List monitors// Real-time window events
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
switch(data.type) {
case 'window_moved':
case 'profile_applied':
case 'monitor_changed':
// Handle events
}
};- Memory Efficient: < 50MB RAM usage with thousands of windows
- CPU Optimized: < 1% CPU usage during normal operation
- Battery Friendly: Intelligent polling and event-driven architecture
- Startup Time: < 2 seconds cold start, < 500ms warm start
- Response Time: < 50ms hotkey response time
- No Network Access: Completely offline operation (except optional API)
- No Data Collection: Zero telemetry or user tracking
- Minimal Permissions: Standard user privileges only
- Open Source: Full source code transparency
- Secure Storage: Encrypted configuration files
- Hotkeys Not Working: Check for conflicts with other applications
- Windows Not Moving: Verify application permissions and window states
- Performance Issues: Adjust animation settings and polling intervals
- Multi-Monitor Problems: Update display drivers and check scaling settings
# Enable verbose logging
WindowsMarginManager.exe --debug --log-level verbose
# Generate diagnostic report
WindowsMarginManager.exe --diagnostics --output diagnostics.zipWe welcome contributions! See CONTRIBUTING.md for guidelines.
# Install development dependencies
dotnet restore
dotnet tool restore
# Run tests
dotnet test
# Code formatting
dotnet formatMIT License - see LICENSE for details.
- Windows API documentation and community
- .NET development team
- Open source contributors
- Beta testers and feedback providers
Transform your desktop experience today! ๐