Skip to content

Commit

Permalink
init shells
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKowalczyk1984 committed Dec 15, 2019
1 parent ea4e0de commit 19049b6
Show file tree
Hide file tree
Showing 19 changed files with 2,038 additions and 0 deletions.
13 changes: 13 additions & 0 deletions shells/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function _update_ps1() {
PS1=$(powerline-shell $?)
}

if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting

export PATH=/usr/local/p/versions/python:$PATH

[ -f ~/.fzf.bash ] && source ~/.fzf.bash
3 changes: 3 additions & 0 deletions shells/editrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bind -v
bind "^R" em-inc-search-prev
bind \\t rl_complete
2 changes: 2 additions & 0 deletions shells/inputrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set editing-mode vi
set convert-meta on
104 changes: 104 additions & 0 deletions shells/zprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Settings for golang {{{
if command -v go >/dev/null; then
export GOROOT=`go env GOROOT`
export GOPATH=$HOME/.go
export GOBIN=$GOPATH/bin
fi
# }}}
# Settings for gem {{{
if command -v gem >/dev/null; then
export GEM_BIN=$(ruby -e "print Gem.user_dir")/bin
fi
# }}}
# Editor {{{
export EDITOR=nvim
export CVSEDITOR="${EDITOR}"
export SVN_EDITOR="${EDITOR}"
export GIT_EDITOR="${EDITOR}"
# }}}
# Language {{{
# LANGUAGE must be set by en_US
export LANGUAGE="en_US.UTF-8"
export LANG="${LANGUAGE}"
export LC_ALL="${LANGUAGE}"
export LC_CTYPE="${LANGUAGE}"
# }}}
# Paths {{{
# Ensure path arrays do not contain duplicates.
typeset -gx -U cdpath fpath mailpath path

fpath=( \
~/.zsh/Completion(N-/) \
~/.zsh/functions(N-/) \
~/.zsh/plugins/zsh-completions(N-/) \
/usr/local/share/zsh/site-functions(N-/) \
$fpath \
)
# }}}
# Set the list of directories that Zsh searches for programs {{{
path=(
/usr/local/{bin,sbin}
$path
$GOBIN
$GEM_BIN
$HOME/.cargo/bin
$HOME/bin
)
# }}}
# Pager {{{
export PAGER=less
export LESS='-F -g -i -M -R -S -w -X -z-4'
export LESSCHARSET='utf-8'

# LESS man page colors (makes Man pages more readable).
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[00;44;37m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

# Set the Less input preprocessor.
if (( $+commands[lesspipe.sh] )); then
export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-'
fi
# }}}
# History {{{
# History file
export HISTFILE=~/.zsh_history
# History size in memory
export HISTSIZE=10000
# The number of histsize
export SAVEHIST=1000000
# The size of asking history
export LISTMAX=50
# Do not add in root
if [[ $UID == 0 ]]; then
unset HISTFILE
export SAVEHIST=0
fi
# }}}
# Temporary Files {{{
if [[ ! -d "$TMPDIR" ]]; then
export TMPDIR="/tmp/$USER"
mkdir -p -m 700 "$TMPDIR"
fi

TMPPREFIX="${TMPDIR%/}/zsh"
if [[ ! -d "$TMPPREFIX" ]]; then
mkdir -p "$TMPPREFIX"
fi
#}}}
# Gurobi environment {{{
export GUROBI_HOME="/opt/gurobi811/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH=$GUROBI_HOME/lib
export CPLEX_DIR="/opt/ibm/ILOG/CPLEX_Studio1263/"
# }}}
# thefuck {{{
eval $(thefuck --alias)
# }}}
#" Folding the .vimrc {{{
# vim:foldmethod=marker:foldlevel=0
# }}}
Loading

0 comments on commit 19049b6

Please sign in to comment.