Skip to content

Notifica per sospendere il lavoro al computer e prendere una pausa per riposare occhi e cervello

License

Notifications You must be signed in to change notification settings

riettotek/Deamons-ora-break

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deamons-ora-break

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

Instructions for implementing:

The shell script

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

The launchd agent

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>
[...]

CLI Commands

$ launchctl load ~/Library/LaunchAgents/ora-break.plist 
$ launchctl start ora-break

To stop the Agent

Perform this command

$ launchctl stop ora-break

Change Settings

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 & Windows compatibility

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.


Extra

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:
info-cmd

About

Notifica per sospendere il lavoro al computer e prendere una pausa per riposare occhi e cervello

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages