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.
- 🔬 High-precision window state detection
- ⚙️ Configurable detection parameters
- 🎯 Advanced process filtering capabilities
- 📊 Comprehensive application metrics
- 🪟 Real-time window analysis
Add the following dependency to your Package.swift file:
dependencies: [
.package(url: "https://github.com/TheBoredTeam/MacroVisionKit.git", from: "0.2.0")
]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)
}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)
}
}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.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by github.com/theboringhumane
Contributions are welcome! Please feel free to submit a Pull Request.