Created
June 14, 2019 16:47
-
-
Save 3amprogrammer/05b97c4359a79733ebc40adf383a129f to your computer and use it in GitHub Desktop.
Mutagen Monitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function is_synced() { | |
output=`mutagen list` | |
if (echo ${output} | grep -q "Watching for changes"); then | |
echo 'yes' | |
else | |
echo 'no' | |
fi | |
} | |
was_synced=false | |
while : | |
do | |
synced=$(is_synced) | |
if [[ ${synced} = 'yes' ]] && [[ ${was_synced} = false ]]; then | |
osascript -e 'display notification "Synced ✅" with title "Mutagen Monitor"' | |
was_synced=true | |
elif [[ ${synced} = 'no' ]] && [[ ${was_synced} = true ]]; then | |
was_synced=false | |
fi | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment