Last active
September 2, 2016 21:47
-
-
Save danthegoodman/6833127 to your computer and use it in GitHub Desktop.
iTerm niceties for bash
This file contains 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
# 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' ; } |
This file contains 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
# 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