Last active
August 29, 2015 14:19
-
-
Save AaronRutley/2827108abf7e86c146a9 to your computer and use it in GitHub Desktop.
imac target display mode alias
This file contains 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
# imac target display mode function | |
alias imac='function _imac(){ | |
if [ $1 = "start" ]; then | |
echo "--- MacBook Bluetooth on..."; | |
blueutil on; | |
sleep 1; | |
echo "--- Connecting to iMac via ssh..."; | |
ssh -2 -p 22 aaronrutley@aaronimac.local sh ~/tdm/start.sh; | |
fi | |
if [ $1 = "end" ]; then | |
echo "--- MacBook Bluetooth off..."; | |
blueutil off; | |
sleep 1; | |
echo "--- Connecting to iMac via ssh..."; | |
ssh -2 -p 22 aaronrutley@aaronimac.local sh ~/tdm/end.sh; | |
fi | |
if [ $1 = "shutdown" ]; then | |
echo "--- MacBook Bluetooth off..."; | |
blueutil off; | |
echo "--- Shutting down remote imac....."; | |
ssh -2 -p 22 aaronrutley@aaronimac.local sh ~/tdm/shutdown.sh; | |
fi | |
if [ $1 = "ssh" ]; then | |
echo "--- Connecting via ssh....."; | |
ssh aaronrutley@aaronimac.local; | |
fi | |
};_imac' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment