Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .aliases
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
#!/usr/bin/env bash

# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color"
else # OS X `ls`
else # macOS `ls`
colorflag="-G"
fi

# List all files colorized in long format
alias ll='ls -lh'
alias ll="ls -lF ${colorflag}"

# List all files colorized in long format, including dot files
alias la="ls -lha"
alias la="ls -laF ${colorflag}"

# List only directories
alias lsd='ls -l | grep "^d"'
alias lsd="ls -lF ${colorflag} | grep --color=never '^d'"

# Always use color output for `ls`
alias ls="command ls ${colorflag}"
Expand Down
12 changes: 5 additions & 7 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH`
PATH=/usr/local/bin:$PATH
PATH=$HOME/bin:$PATH
export PATH
# Add `~/bin` to the `$PATH`
export PATH="$HOME/bin:$PATH";

# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
[ -r "$file" ] && source "$file"
done
unset file
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
70 changes: 30 additions & 40 deletions .bash_prompt
Original file line number Diff line number Diff line change
@@ -1,56 +1,46 @@
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
# Screenshot: http://i.imgur.com/s0Blh.png

if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
export TERM='xterm-256color';
fi;

if tput setaf 1 &> /dev/null; then
tput sgr0
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
# Changed these colors to fit Solarized theme
MAGENTA=$(tput setaf 125)
ORANGE=$(tput setaf 166)
GREEN=$(tput setaf 64)
PURPLE=$(tput setaf 61)
WHITE=$(tput setaf 244)
else
MAGENTA=$(tput setaf 5)
ORANGE=$(tput setaf 4)
GREEN=$(tput setaf 2)
PURPLE=$(tput setaf 1)
WHITE=$(tput setaf 7)
fi
BOLD=$(tput bold)
RESET=$(tput sgr0)
tput sgr0; # reset colors
bold=$(tput bold);
reset=$(tput sgr0);
# Oceanic Next colors
black=$(tput setaf 16);
blue=$(tput setaf 68);
cyan=$(tput setaf 73);
green=$(tput setaf 114);
orange=$(tput setaf 209);
magenta=$(tput setaf 176);
red=$(tput setaf 203);
white=$(tput setaf 66);
yellow=$(tput setaf 221);
else
MAGENTA="\033[1;31m"
ORANGE="\033[1;33m"
GREEN="\033[1;32m"
PURPLE="\033[1;35m"
WHITE="\033[1;37m"
BOLD=""
RESET="\033[m"
fi

export MAGENTA
export ORANGE
export GREEN
export PURPLE
export WHITE
export BOLD
export RESET
bold='';
reset="\e[0m";
black="\e[1;30m";
blue="\e[1;34m";
cyan="\e[1;36m";
green="\e[1;32m";
orange="\e[1;33m";
magenta="\e[1;35m";
red="\e[1;31m";
white="\e[1;37m";
yellow="\e[1;33m";
fi;

function parse_git_dirty() {
[[ $(git status 2> /dev/null | tail -n1) != *"working directory clean"* ]] && echo "*"
[[ $(git status 2> /dev/null | tail -n1) != *"nothing to commit"* ]] && echo "*"
}

function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
}

export PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
export PS2="\[$ORANGE\]→ \[$RESET\]"
PS1="\[${bold}\]\[$green\]\w\[$white\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$magenta\]\$(parse_git_branch)\[$white\]\n\$ \[$reset\]"
9 changes: 2 additions & 7 deletions .gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
hist = log --graph --pretty=format:'%Cred%h%Creset %s%C(yellow)%d%Creset %Cgreen(%cr)%Creset [%an]' --abbrev-commit --date=relative

[color]
# Use colors in Git commands that are capable of colored output when outputting to the terminal
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
ui = auto
[color "branch"]
current = yellow reverse
Expand All @@ -22,9 +23,3 @@
added = yellow
changed = green
untracked = cyan

# Use `origin` as the default remote on the `master` branch in all cases
[branch "master"]
remote = origin
merge = refs/heads/master

8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,3 @@ Thumbs.db
# Files that might appear on external disks
.Spotlight-V100
.Trashes

# Compiled Python files
*.pyc

# Application specific files
venv
node_modules
.sass-cache
Loading