Skip to content

Instantly share code, notes, and snippets.

@AaronRutley
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AaronRutley/2827108abf7e86c146a9 to your computer and use it in GitHub Desktop.
Save AaronRutley/2827108abf7e86c146a9 to your computer and use it in GitHub Desktop.
imac target display mode alias
# 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