Last active
May 11, 2019 15:08
-
-
Save liginv/9033ea36064f309dff165df51d81f3cc to your computer and use it in GitHub Desktop.
My personal zsh terminal config
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
# Update all pip packages within the environment | |
alias pipup='pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs sudo pip install -U' | |
alias pip3up='pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs sudo pip3 install -U' | |
# Tweaks | |
alias lm='ls -lah' | |
alias cls='clear' | |
alias pf='pip freeze' | |
alias pin='pip install' | |
alias cat='ccat' | |
alias zshconfig="subl ~/.zshrc" | |
alias tdns="bash ~/dnstest.sh |sort -k 22 -n" | |
# jrnl | |
alias 2day='jrnl work < ~/Developer/jrnl/work_template.txt && jrnl work -n 1 --edit' | |
alias jedit='jrnl -n 1 --edit' | |
#Scheme | |
alias scheme="/Applications/MIT\:GNU\ Scheme.app/Contents/Resources/mit-scheme" | |
#django cookiecutter | |
alias coco="cookiecutter https://github.com/pydanny/cookiecutter-django" | |
#Homebrew tweak | |
alias brewall='brew update && brew upgrade && brew doctor; brew cleanup' | |
#python+Django tweaks | |
alias csusr="./manage.py createsuperuser" | |
alias mmig="./manage.py makemigrations" | |
alias mig="./manage.py migrate" | |
alias runs="./manage.py runserver" | |
#tmux | |
alias tls="tmux ls" | |
alias attach="tmux attach" | |
#Go back in dir structure | |
alias ..="cd .." | |
alias ..2="cd ../.." | |
alias ..3="cd ../../.." | |
alias ..4="cd ../../../.." | |
alias ..5="cd ../../../../.." | |
#Check the memory size | |
alias mem="du -sm * | sort -rn | head -16" | |
#iTerm2 | |
function iterm2_print_user_vars() { | |
iterm2_set_user_var gitBranch $((git branch 2> /dev/null) | grep \* | cut -c3-) | |
} | |
#vlc | |
alias vlc="/Applications/VLC.app/Contents/MacOS/VLC" | |
#icloud directory shortcut | |
alias icloud="cd /Users/liginvellakkad/Library/Mobile\ Documents/com~apple~CloudDocs/" | |
#anaconda python | |
alias anapy='/Users/liginvellakkad/anaconda/bin/python3.6' | |
#simple python server (without port) | |
alias loca='python -m SimpleHTTPServer' | |
#pytest | |
#alias pytest='pytest -x --ff' | |
#emacs | |
alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs' | |
#visual studio code | |
alias code='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code' | |
#EC2 access | |
alias eclee="ssh -i /Users/liginvellakkad/.ssh/ligin.pem -R 52698:localhost:52698 [email protected]" | |
#Digital Ocean | |
alias digi="ssh -i /Users/liginvellakkad/.ssh/id_rsa.pub -R 52698:localhost:52698 [email protected]" | |
#Karma EC2 | |
alias karma="ssh -i .ssh/karma1.pem [email protected]" | |
#current project dir | |
alias fin="cd ~/Developer/hamon/project03/work/new/" | |
#current project notes dir | |
alias fnotes="cd ~/Developer/hamon/project03/res/E-E\ data" | |
#learn | |
alias tut="cd /Volumes/JetDrive/tuts/lab/" | |
# interns | |
alias roshna="ssh -i .ssh/ligin.pem [email protected]" | |
alias zuhara="ssh -i .ssh/ligin.pem [email protected]" | |
# gatsby | |
alias ghw="https://github.com/gatsbyjs/gatsby-starter-hello-world" | |
# knowledge repo | |
alias kr="knowledge_repo --repo" | |
# Knowledge Repo instance | |
alias lee="ssh -i /Users/liginvellakkad/.ssh/MyKeyPair.pem [email protected]" | |
# timetracker cli | |
alias time="python ~/Developer/tweaks/trackmac.py" | |
# Project 03 - Kull | |
alias oned="cd ~/Developer/hamon/project04/" |
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
# Rebind prefix key | |
unbind C-b | |
set-option -g prefix C-q | |
bind-key C-q send-prefix | |
### LOOK & FEEL ### | |
set -g default-terminal "xterm-256color" | |
# default statusbar colors | |
set-option -g status-bg colour235 | |
set-option -g status-fg colour179 | |
set-option -g status-attr default | |
# default window title colors | |
set-window-option -g window-status-fg colour244 | |
set-window-option -g window-status-bg default | |
# active window title colors | |
set-window-option -g window-status-current-fg colour166 | |
set-window-option -g window-status-current-bg default | |
set-window-option -g window-status-current-attr bright | |
# pane border | |
set-option -g pane-border-fg colour235 | |
set-option -g pane-active-border-fg colour240 | |
# pane number display | |
set-option -g display-panes-active-colour colour33 | |
set-option -g display-panes-colour colour166 | |
# clock | |
set-window-option -g clock-mode-colour colour64 | |
# status bar right contents | |
set -g status-right-length 65 | |
set -g status-right "#[fg=default][%H:%M %e-%b-%Y]" | |
set -g status-interval 5 | |
#reload source file | |
bind R source-file ~/.tmux.conf | |
#mouse mode toggle | |
bind m set -g mouse on | |
bind M set -g mouse off |
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
############################################################################## | |
# Path Configuration | |
############################################################################## | |
export PATH="$HOME/.bin:$PATH" | |
export PATH="/usr/local/sbin:$PATH" # homebrew path | |
export PATH="/usr/local/bin/npm:$PATH" # npm path | |
export PATH="/usr/local/bin/node:$PATH" # node path | |
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
source /Users/liginvellakkad/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
export PATH="$PATH:$HOME/.yarn/bin" | |
#to access yarn binaries globally | |
export PATH="$PATH:`yarn global bin`" | |
# flutter | |
export PATH=/Users/liginvellakkad/Developer/flutter/flutter/bin:$PATH | |
#python virtualenvwrapper | |
export WORKON_HOME=$HOME/.virtualenvs | |
export PROJECT_HOME=$HOME/Developer | |
source /usr/local/bin/virtualenvwrapper.sh | |
# Go-Lang Path | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin | |
# Rust | |
export PATH="$HOME/.cargo/bin:$PATH" | |
#scipy | |
export PATH="$PATH:/Users/liginvellakkad/Library/Python/3.6/bin" | |
############################################################################## | |
# History Configuration | |
############################################################################## | |
HISTCONTROL=ignoreboth # don't put duplicate lines or lines starting with space in the history. | |
HISTSIZE=5000 #How many lines of history to keep in memory | |
HISTFILE=~/.zsh_history #Where to save history to disk | |
SAVEHIST=5000 #Number of history entries to save to disk | |
HISTDUP=erase #Erase duplicates in the history file | |
setopt appendhistory #Append history to the history file (no overwriting) | |
setopt sharehistory #Share history across terminals | |
setopt incappendhistory #Immediately append to the history file, not just when a term is killed | |
setopt extended_history # record timestamp of command in HISTFILE | |
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE | |
setopt hist_ignore_dups # ignore duplicated commands history list | |
setopt hist_ignore_space # ignore commands that start with space | |
setopt hist_verify # show command with history expansion to user before running it | |
setopt inc_append_history # add commands to HISTFILE in order of execution (before executed) | |
setopt share_history # share command history data | |
if [ -f ~/.aliases ]; then | |
. ~/.aliases | |
fi | |
#Make Directory & cd to it | |
function mcd () { mkdir -p "$@" && eval cd "\"\$$#\""; } | |
export PATH="$HOME/.fastlane/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment