diff --git a/.bashrc b/.bashrc index 885c011..4bde912 100644 --- a/.bashrc +++ b/.bashrc @@ -1,5 +1,5 @@ # ALIASES -alias cgrep="grep --color" +alias grep="grep --color" alias vim="/Applications/MacVim.app/Contents/bin/mvim -v" alias utcclock="TZ=UTC vtclock" alias urldecode='python -c "import sys, urllib as ul; \ @@ -12,12 +12,26 @@ function sfind(){ find . -name "$1" -print0 | xargs -0 grep "$2" } +function phow(){ + curl https://cht.sh/$1/$2?Q +} + function csv2mdt(){ cat $1 | sed 1p | LC_ALL=C sed -e 's/,/ |\ \;\ \; /g' -e 's/^/| /g' -e 's/$/ |/g' -e '2 s/[^|]/-/g' | LC_ALL=C tr -d $'\r' } # EXPORTS export PATH=/opt/local/bin:/opt/local/sbin:$PATH -export PS1="\[\e[00;31m\][\h]\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;32m\]\u\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;34m\][\w]\[\e[0m\]\[\e[00;37m\]\n [\#] \\$ \[\e[0m\]" +export PATH=$PATH:$HOME/Library/Python/2.7/bin +# export PS1="\[\e[00;31m\][\h]\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;32m\]\u\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;34m\][\w]\[\e[0m\]\[\e[00;37m\]\n [\#] \\$ \[\e[0m\]" +export TERM=xterm-256color + +# POWERLINE +powerline-daemon -q +POWERLINE_BASH_CONTINUATION=1 +POWERLINE_BASH_SELECT=1 +. /Users/evanreichard/Library/Python/2.7/lib/python/site-packages/powerline/bindings/bash/powerline.sh + +# TMUX & NEOFETCH [ ! -z $TMUX ] || tmux a || tmux neofetch diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..62a03ae --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,24 @@ +set-option -g default-shell /opt/local/bin/bash +set-option -g prefix C-t +set-option -g renumber-windows on + +# Copy-paste integration +set-option -g default-command "reattach-to-user-namespace -l bash" + +# Use vim keybindings in copy mode +setw -g mode-keys vi + +# Setup 'v' to begin selection as in Vim +#bind-key -t vi-copy v begin-selection +#bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" + +# Update default binding of `Enter` to also use copy-pipe +#unbind -t vi-copy Enter +#bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" + +# Bind ']' to use pbpaste +bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" + +# Powerline +source /Users/evanreichard/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf +set -g default-terminal "screen-256color"