Skip to content

Instantly share code, notes, and snippets.

@josefnpat
Created November 16, 2012 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save josefnpat/4083349 to your computer and use it in GitHub Desktop.
Save josefnpat/4083349 to your computer and use it in GitHub Desktop.
Watch for changes in a git repo and send to notify-send
#!/usr/bin/php
<?php
while(1){
if("Already up-to-date." == $ans = rtrim(`git pull`)){
echo ".";
} else {
echo "\n$ans\n";
`notify-send "$ans"`;
}
sleep(5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment