Skip to content

Instantly share code, notes, and snippets.

@jorgeuriarte
Created May 15, 2017 09:30
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 jorgeuriarte/ea8472ed725a938c31d97c0d6b30e3e7 to your computer and use it in GitHub Desktop.
Save jorgeuriarte/ea8472ed725a938c31d97c0d6b30e3e7 to your computer and use it in GitHub Desktop.
Cambio de fondo para sesiones de terminal
#!/bin/sh
#
# Ponerlo en bin/ssh
#
HOSTNAME=`echo $@ | sed s/.*@//`
set_prod_settings() {
osascript -e "Tell application \"Terminal\" to set current settings of front window to settings set \"Red Sands\""
}
set_normal_settings() {
osascript -e "Tell application \"Terminal\" to set current settings of front window to settings set \"Grass\""
}
set_remote_settings() {
osascript -e "Tell application \"Terminal\" to set current settings of front window to settings set \"Ocean\""
}
on_exit () {
set_normal_settings
}
trap on_exit EXIT
case $HOSTNAME in
*dev*|*pruebas*|*testing*) set_remote_settings;;
*) set_prod_settings;;
esac
/usr/bin/ssh "$@"
on_exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment