Posted By

neilio on 08/01/09


Tagged

textmate sync things wake sleepwatcher


Versions (?)

sleepwatcher wakeup script for Things sync


 / Published in: Other
 

  1. #!/bin/sh
  2.  
  3. # add ip / hostname separated by white space
  4. HOSTS="neilio.local"
  5.  
  6. # no ping request
  7. COUNT=1
  8.  
  9. # email report when
  10. for myHost in $HOSTS
  11. do
  12. count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
  13. if [ $count -eq 0 ]; then
  14. # 100% failed
  15. osascript -e 'tell application "Finder" to open application file id "Thgs"'
  16. osascript -e 'tell application "Things" to activate'
  17. osascript -e 'delay 5'
  18. osascript -e 'tell application "Things" to close window 1'
  19. fi
  20. done

Report this snippet  

You need to login to post a comment.