-
-
Save jorgeuriarte/ea8472ed725a938c31d97c0d6b30e3e7 to your computer and use it in GitHub Desktop.
Cambio de fondo para sesiones de terminal
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
#!/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