Skip to content

vegca/ScreenLockDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ScreenLockDetector

macOS service that executes Shortcuts based on screen lock/unlock events.

Setup

  1. Edit ScreenLockDetector.swift and update:
static let setOnShortcut = "Your Unlock Shortcut"
static let setOffShortcut = "Your Lock Shortcut"
  1. Run the install script:
./install.sh

Useful commands

# View logs
tail -f /tmp/screen-lock-detector.log

# Stop service
launchctl stop $USER.screen-lock-detector

# Uninstall
launchctl unload ~/Library/LaunchAgents/$USER.screen-lock-detector.plist
rm ~/Library/LaunchAgents/$USER.screen-lock-detector.plist
rm -rf ~/Library/Application\ Support/ScreenLockDetector

Requirements

  • macOS 15.5+
  • Shortcuts configured in Shortcuts.app

Releases

No releases published

Packages

No packages published