Skip to content

Instantly share code, notes, and snippets.

@sergii
Last active August 29, 2015 14:12
Show Gist options
  • Save sergii/80c89a91033828ca6412 to your computer and use it in GitHub Desktop.
Save sergii/80c89a91033828ca6412 to your computer and use it in GitHub Desktop.
make ()
{
start=$(date +%s);
if command make "$@"; then
icon=checkbox;
else
icon=computer-fail;
fi;
nl='
';
ive_switched_to_hacker_news=4;
if command -V notify-send &> /dev/null && [[ $(( $(date +%s) - ${start} )) -gt ${ive_switched_to_hacker_news} ]]; then
notify-send 'Done compiling, back to work:' "${nl}$(hostname):${nl}$(pwd)" --icon=${icon} --expire-time=15000;
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment