Skip to content

aeilot/stay-away-from-my-screen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Icon-iOS-Default-1024x1024@1x

Stay Away From My Screen

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.

STAY AWAY FROM MY SCREEN - The "Don't Touch" sign for your Mac's expensive screen. | Product Hunt

Features

  • 🎯 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

Screenshots

Screenshot 2026-01-10 at 10 10 12 image image

Requirements

  • macOS 13.0 or later
  • Accessibility permissions (for global hotkey functionality)
  • Camera permissions (optional, for hand tracking feature)

Installation

Building from Source

  1. Clone the repository:

    git clone https://github.com/aeilot/stay-away-from-my-screen.git
    cd stay-away-from-my-screen
  2. Open the project in Xcode:

    open stay-away-from-my-screen.xcodeproj
  3. Build and run the project (⌘R)

Setup

Granting Accessibility Permissions

For the global hotkey to work, you need to grant Accessibility permissions:

  1. Open System Settings > Privacy & Security > Accessibility
  2. Click the lock icon to make changes
  3. Add and enable "Stay Away From My Screen"

The app will prompt you for these permissions on first launch.

Granting Camera Permissions (Optional)

For hand tracking to work, you need to grant Camera permissions:

  1. Open System Settings > Privacy & Security > Camera
  2. Enable "Stay Away From My Screen"

This is only required if you want to use the automatic hand tracking feature.

Usage

Basic Usage

  1. Launch the app - it will appear in your menu bar with a warning light icon (⚠️)
  2. Set up your preferred hotkey in Settings
  3. Press your hotkey to show/hide the popup overlay

Configuring Settings

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

Using Cracked Screen Effect

  1. Open Settings
  2. Enable "Use Cracked Screen Effect"
  3. Trigger the popup with your hotkey or hand gesture
  4. A realistic cracking animation will appear at your cursor position for 3 seconds

Using Hand Tracking

  1. Open Settings
  2. Enable "Enable Hand Tracking"
  3. Grant camera permissions when prompted
  4. The app will now automatically detect when you or someone else reaches toward the screen
  5. The warning will activate automatically when a stretching gesture is detected

Setting a Hotkey

  1. Open Settings
  2. Click on the hotkey field under "Global Hot Key"
  3. Press your desired key combination (must include at least one modifier: ⌘, ⇧, βŒƒ, or βŒ₯)
  4. The hotkey is saved automatically

Default Configuration

  • 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

Project Structure

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

Technologies

  • 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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Created by Chenluo Deng

Acknowledgments

  • HotKey - Swift framework for global keyboard shortcuts

About

The instant digital "Do Not Touch" sign for your Mac. Stop fingerprints and protect your expensive display with one keystroke.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages