Skip to content

Instantly share code, notes, and snippets.

@danthegoodman
Last active September 2, 2016 21:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danthegoodman/6833127 to your computer and use it in GitHub Desktop.
Save danthegoodman/6833127 to your computer and use it in GitHub Desktop.
iTerm niceties for bash
# Sends a message to growl from the terminal
#
# Usage: alert <text>
# Result: Growl notification with text
#
# Example: sleep 10 ; alert 'I am awake'
alert() { echo -e $'\e]9;'${@}'\007' ; }
# Changes the profile for the current tab.
#
# Usage: iterm_profile <profile_name>
# Result: The iterm profile is changed
iterm_profile() { echo -e '\033]50;SetProfile='$1'\a' ; }
#
# Example: Change profile when ssh'ing.
# This can change the font, scroll size, text colors, etc
#
# I like to change my background color.
#
color_ssh() {
iterm_profile Remote
ssh $@
iterm_profile Default
}
alias ssh='color_ssh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment