MacroVisionKit
November 22, 2025 ยท View on GitHub
A sophisticated macOS framework for real-time detection and analysis of application window states, specifically focused on identifying applications operating in full-screen or maximized viewport configurations.
Features
- ๐ฌ High-precision window state detection
- โ๏ธ Configurable detection parameters
- ๐ฏ Advanced process filtering capabilities
- ๐ Comprehensive application metrics
- ๐ช Real-time window analysis
Installation
Swift Package Manager
Add the following dependency to your Package.swift file:
dependencies: [
.package(url: "https://github.com/TheBoredTeam/MacroVisionKit.git", from: "0.2.0")
]
Usage
Basic Implementation
import MacroVisionKit
// Initialize the monitor
let monitor = FullScreenMonitor.shared
// Get current Full Screen apps
let fullScreenApps = monitor.detectFullscreenApps()
// Process detection results
fullScreenApps.forEach { spaceInfo in
print(spaceInfo.debugDescription)
}
Real-time Updates
Use the spaceChanges() method to get an asynchronous stream of fullscreen space updates:
import MacroVisionKit
// Get the stream of space changes
let monitor = FullScreenMonitor.shared
let stream = await monitor.spaceChanges()
// Process updates asynchronously
for await fullScreenSpaces in stream {
print("Fullscreen spaces updated: \(fullScreenSpaces.count)")
fullScreenSpaces.forEach { spaceInfo in
print(spaceInfo.debugDescription)
}
}
Testing with the Example
To test the framework, you can run the included example application. First, ensure you have Swift installed on your macOS system.
-
Clone the repository:
git clone https://github.com/TheBoredTeam/MacroVisionKit.git cd MacroVisionKit -
Build and run the example:
swift run FullScreenMonitorExample -
The example will start monitoring for fullscreen space changes. Open some applications in fullscreen mode to see the detection in action. Press
Ctrl+Cto exit.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Created by github.com/theboringhumane
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.