The instant digital "Do Not Touch" sign for your Mac. Stop fingerprints and protect your expensive display with one keystroke.
We've all winced when a colleague leans in to jab their finger right onto our pristine screen to "point something out." Stay Away From My Screen is a lightweight macOS menu bar utility designed to stop that mid-motion. With a single global hotkey, deploy a massive, unmissable warning shield that effectively shouts "HANDS OFF." It's the perfect deterrent for greasy fingers, and also doubles as a quick privacy screen when you need to step away for a moment.
- π― Global Hotkey: Trigger the popup from anywhere with a customizable keyboard shortcut
- π₯ Cracked Screen Effect: Realistic cracking animation at cursor position as an alternative to text warning
- ποΈ Hand Tracking Detection: Vision framework-based automatic activation when fingers stretch toward screen
- π¨ Customizable Appearance: Change the popup text and background color
- π Smart Positioning: Popup appears at mouse cursor location and stays on screen
- π Launch at Login: Optional auto-start with macOS
- π« Floating Panel: Always-on-top overlay that works across all spaces and fullscreen apps
- βοΈ Menu Bar Access: Quick access to settings and controls from the menu bar
- macOS 13.0 or later
- Accessibility permissions (for global hotkey functionality)
- Camera permissions (optional, for hand tracking feature)
-
Clone the repository:
git clone https://github.com/aeilot/stay-away-from-my-screen.git cd stay-away-from-my-screen -
Open the project in Xcode:
open stay-away-from-my-screen.xcodeproj
-
Build and run the project (βR)
For the global hotkey to work, you need to grant Accessibility permissions:
- Open System Settings > Privacy & Security > Accessibility
- Click the lock icon to make changes
- Add and enable "Stay Away From My Screen"
The app will prompt you for these permissions on first launch.
For hand tracking to work, you need to grant Camera permissions:
- Open System Settings > Privacy & Security > Camera
- Enable "Stay Away From My Screen"
This is only required if you want to use the automatic hand tracking feature.
- Launch the app - it will appear in your menu bar with a warning light icon (
β οΈ ) - Set up your preferred hotkey in Settings
- Press your hotkey to show/hide the popup overlay
Access settings through:
- Menu bar icon > Settings
- Or from the main app window
Available Settings:
- Launch at Login: Automatically start the app when you log in
- Global Hot Key: Set your preferred keyboard shortcut (e.g., ββ§S)
- Use Cracked Screen Effect: Toggle between text warning and cracked screen animation
- Popup Text: Customize the message displayed in the popup (when not using cracked screen)
- Popup Color: Choose the background color for the popup (when not using cracked screen)
- Enable Hand Tracking: Automatically activate when fingers stretch toward the screen using Vision framework
- Open Settings
- Enable "Use Cracked Screen Effect"
- Trigger the popup with your hotkey or hand gesture
- A realistic cracking animation will appear at your cursor position for 3 seconds
- Open Settings
- Enable "Enable Hand Tracking"
- Grant camera permissions when prompted
- The app will now automatically detect when you or someone else reaches toward the screen
- The warning will activate automatically when a stretching gesture is detected
- Open Settings
- Click on the hotkey field under "Global Hot Key"
- Press your desired key combination (must include at least one modifier: β, β§, β, or β₯)
- The hotkey is saved automatically
- Default Hotkey: ββ§S (Command + Shift + S)
- Default Text: "STAY AWAY FROM MY SCREEN"
- Default Color: Red
- Default Effect: Text warning (cracked screen disabled)
- Default Hand Tracking: Disabled
stay-away-from-my-screen/
βββ App.swift # Main app entry point
βββ View/
β βββ ContentView.swift # Main window view
β βββ MenuView.swift # Menu bar menu
β βββ PopupView.swift # Popup overlay panel
β βββ CrackedScreenView.swift # Cracked screen effect
β βββ SettingsView.swift # Settings interface
βββ Utils/
βββ HotKeyManager.swift # Global hotkey handling
βββ HandTrackingManager.swift # Vision-based hand tracking
βββ SettingsManager.swift # User preferences persistence
- SwiftUI: Modern declarative UI framework
- AppKit: macOS-specific UI components and window management
- Vision: Apple's framework for hand pose detection and tracking
- AVFoundation: Camera capture for hand tracking
- HotKey: Third-party library for global hotkey registration
This project is licensed under the MIT License - see the LICENSE file for details.
Created by Chenluo Deng
- HotKey - Swift framework for global keyboard shortcuts