Skip to content

Instantly share code, notes, and snippets.

@ivanvmoreno
Created March 24, 2023 11:34
Show Gist options
  • Save ivanvmoreno/90a3062a7451ee658cf02c6ad57483e5 to your computer and use it in GitHub Desktop.
Save ivanvmoreno/90a3062a7451ee658cf02c6ad57483e5 to your computer and use it in GitHub Desktop.
Launch agent to keep freedom.to macOS application running, even if I quit the application ✅
  • The launch agent, KeepFreedomRunning.plist must be placed on ~/Library/LaunchAgents
  • The script KeepFreedomRunning must be placed at ~/Library/Scripts
  • By default, the script checks if the Freedom app is running every minute (60 seconds). You can adjust this on the property StartInterval (specified in seconds)
#!/usr/bin/osascript
# file: KeepFreedomRunning
if application "Freedom" is not running then
tell application "Freedom" to run
end if
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>KeepFreedomRunning</string>
<key>Program</key>
<string>/Users/<user>/Library/Scripts/KeepFreedomRunning</string>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment