Skip to content

Instantly share code, notes, and snippets.

@mrmartineau
Last active October 29, 2016 10:49
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 mrmartineau/fb0b82ea60489bf9e1e9270807adb67a to your computer and use it in GitHub Desktop.
Save mrmartineau/fb0b82ea60489bf9e1e9270807adb67a to your computer and use it in GitHub Desktop.
Bash-it settings
#!/usr/bin/env bash
# Path to the bash it configuration
export BASH_IT="/Users/mrmartineau/.bash_it"
# Lock and Load a custom theme file
# location /.bash_it/themes/
export BASH_IT_THEME='zander'
# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
# export BASH_IT_REMOTE='bash-it'
# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='git@git.domain.com'
# Don't check mail when opening terminal.
unset MAILCHECK
# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'
# Set this to the command you use for todo.txt-cli
export TODO="t"
# Set this to false to turn off version control status checking within the prompt for all themes
export SCM_CHECK=true
# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/djl/vcprompt
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
# (Advanced): Uncomment this to make Bash-it reload itself automatically
# after enabling or disabling aliases, plugins, and completions.
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
#################################
# INTEGRATIONS
#################################
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
# Load Bash It
source $BASH_IT/bash_it.sh
alias s="subl ."
alias st='open -a "Sublime Text"'
alias aliases="st ~/.aliases"
# List all files colorized in long format
alias l="ls -Gl"
# List all files colorized in long format, including dot files
alias la="ls -Gla"
# List only directories
alias lsd='ls -l | grep "^d"'
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apple’s System Logs to improve shell startup speed
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
# Show/hide hidden files in Finder
alias show="defaults write com.apple.Finder AppleShowAllFiles -bool true && killall Finder"
alias hide="defaults write com.apple.Finder AppleShowAllFiles -bool false && killall Finder"
# Hide/show all desktop icons (useful when presenting)
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
# Edit hosts file
alias hosts="sudo nano /private/etc/hosts"
alias hostst="sudo st /private/etc/hosts"
#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✔"
SCM_THEME_PROMPT_PREFIX=" ❮"
SCM_THEME_PROMPT_SUFFIX="${green}❯"
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✔"
GIT_THEME_PROMPT_PREFIX=" ${green}❮ "
GIT_THEME_PROMPT_SUFFIX="${green} ❯"
RVM_THEME_PROMPT_PREFIX=" ❮ "
RVM_THEME_PROMPT_SUFFIX=" ❯ "
function prompt_command() {
PS1="\n🐶 in ${yellow}\w ${cyan}$(scm_prompt_info)\n❯ ${reset_color}"
}
safe_append_prompt_command prompt_command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment