Per Mac OSX. Notifica per sospendere il lavoro al computer e prendere una pausa per riposare occhi e cervello.
Istruzioni di implementazione in inglese affinchè sia fruibile da tutti
- Shell script that shows the notification
- The config plist file for the launchd agent that sets up the recurring reminder
- CLI commands to initialize such agent.
It uses the Mac's built-in notification system to show the message
Place it in this folder ~/scripts/ora-break.sh
You able to change the location as u prefer, but remember to inform your plist file about the new location
Place this file in ~/Library/LaunchAgents/ora-break.plist
Open the file in your prefered IDE to change the values for the interval of seconds and the directory to place the shell script
Remember to change path for the shell script in order to match your (see YOURACCOUNT)
[...]
<array>
<string>sh</string>
<string>/Users/YOURACCOUNT/scripts/ora-break.sh</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
[...]
$ launchctl load ~/Library/LaunchAgents/ora-break.plist
$ launchctl start ora-break
Perform this command
$ launchctl stop ora-break
if you ever want to change the agent settings, you'll additionally need to unload the agent and then reload and restart it to pick up the changes
$ launchctl unload ~/Library/LaunchAgents/ora-break.plist
Linux: show desktop notifications with notify-send and manage the notification schedule with a systemd timer
Windows: show desktop notifications with Windows Script Host and manage the schedule with Task Scheduler.
U can do more with the shell script. It uses the osascript command , passing an argument with -e
flag as an Applescript statement (the is the default language)
Here is some examples: