Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@riffraff
Created July 1, 2014 09:13
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 riffraff/f4e63bac0ae9ef38b26f to your computer and use it in GitHub Desktop.
Save riffraff/f4e63bac0ae9ef38b26f to your computer and use it in GitHub Desktop.
ssh ()
{
REMOTE_TERMINAL_THEME_NAME="Solarized Light";
SSH=$(which ssh);
CURTHEME=$(osascript -e "tell application \"Terminal\" to get the name of current settings of the selected tab of the front window");
CURTAB=$(osascript -e "tell application \"Terminal\" to get the selected tab of the front window");
osascript -e "tell application \"Terminal\" to set current settings of $CURTAB to settings set \"$REMOTE_TERMINAL_THEME_NAME\"";
$SSH "$@";
osascript -e "tell application \"Terminal\" to set current settings of $CURTAB to settings set \"$CURTHEME\""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment