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 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
# 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 [email protected] 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 [email protected] sh ~/tdm/end.sh; | |
fi | |
if [ $1 = "shutdown" ]; then | |
echo "--- MacBook Bluetooth off..."; | |
blueutil off; | |
echo "--- Shutting down remote imac....."; | |
ssh -2 -p 22 [email protected] sh ~/tdm/shutdown.sh; | |
fi | |
if [ $1 = "ssh" ]; then | |
echo "--- Connecting via ssh....."; | |
ssh [email protected]; | |
fi | |
};_imac' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment