Skip to content

Instantly share code, notes, and snippets.

@joe-sullivan
Last active March 1, 2024 05:28
Show Gist options
  • Save joe-sullivan/d5055d62d2a83a627ef6c3ddea06c64d to your computer and use it in GitHub Desktop.
Save joe-sullivan/d5055d62d2a83a627ef6c3ddea06c64d to your computer and use it in GitHub Desktop.
Bash Tricks
#!/bin/sh
if [ "$1" == "prod" ]; then
printf '\033]11;#331C1F\007' # red
elif [ "$1" == "dev" ]; then
printf '\033]11;#192436\007' # blue
elif [ "$1" == "other" ]; then
printf '\033]11;#253320\007' # green
else
printf '\033]11;#282c34\007' # black
fi
# http://bryangilbert.com/post/etc/term/dynamic-ssh-terminal-background-colors/
# open man in new window (use with ssh -X to forward to local machine)
man() {
xterm -bg wheat1 -fg darkred -geometry 80x40 -fa Monospace -fs 11 -e "man $@" &
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment