Created
January 4, 2022 17:18
-
-
Save dfelton/cba42444b70ecc252a495560c2083cc1 to your computer and use it in GitHub Desktop.
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
coffee() { | |
ps aux | grep -v grep | grep caffeinate > /dev/null | |
if [ $? -eq 1 ]; then | |
caffeinate -dimsu & | |
fi | |
} | |
killCoffee() { | |
ps aux | grep -v grep | grep caffeinate > /dev/null | |
if [ $? -eq 0 ]; then | |
kill $(pgrep -f caffeinate) | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nice