2

I want to run script when my mac is idle (for example after 5 minutes or screen saver start time is also ok) and when I resume it from idle state.

I know that I can write daemon using NSDistributedNotificationCenter and com.apple.screenIsLocked and com.apple.screenIsUnlocked, but I hope that there is already solution without creating new daemon.

I need this to for example turn on/off speed limit for Transmission (as it is sometimes hard to work when hashing/downloading on full speed).

fixer1234
  • 28,064
tig
  • 4,803

2 Answers2

1

Sleepwatcher -- See my answer to Automatically run a program when mac wakes from sleep

JRobert
  • 7,134
0

Look at the batch command:

man batch
Hai Vu
  • 6,200