commit 7f90a67487a3d40b45fa174d498977b8b9026666 Author: Marcel Schoengens Date: Thu May 17 16:59:54 2018 +0200 Initial commit. diff --git a/dotconf.sh b/dotconf.sh new file mode 100644 index 0000000..48dd08a --- /dev/null +++ b/dotconf.sh @@ -0,0 +1,20 @@ +export DOTCONFDIR=~/.dotconfigs + +function dotconf () { + case "$1" in + "setup") + ln -s $DOTCONFDIR/zsh/zshrc ~/.zshrc + ln -s $DOTCONFDIR/tmux/tmux.conf ~/.tmux.conf + ;; + + "update") + OLDDIR="$(PWD)" + cd $DOTCONFDIR && git pull origin + cd "$OLDDIR" + ;; + + *) + echo "Usage: dotconf [setup|update]." + ;; + esac +} diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..b614c51 --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1 @@ +set-option -g prefix C-t \ No newline at end of file diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..e102e68 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,53 @@ +ZSH=$HOME/.ohmyzsh +DOTCONFDIR=$HOME/.dotconfigs + +URL_OMZSH="https://github.com/robbyrussell/oh-my-zsh.git" + +### Install oh-my-zsh + +if [[ ! -d $ZSH ]]; then + if curl --output /dev/null --silent -m 1 --head --fail "$URL_OMZSH"; then + echo "Installing Oh My ZSH" + git clone "$URL_OMZSH" $ZSH + fi +fi + + +### Configure oh-my-zsh + +ZSH_THEME="pygmalion" + +plugins=( + git + pip +) + +source $ZSH/oh-my-zsh.sh + + +### Configure zsh + +HISTSIZE=20000 +HISTFILE=~/.zsh_history +SAVEHIST=$HISTSIZE +# hosts=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ }) + + +### Generic Setup +export LC_ALL='en_US.UTF-8' +export WORKON_HOME=~/.virtualenvs + +alias em='emacs -nw' + +source $DOTCONFDIR/dotconf.sh + + +# System specific config +SYS=`uname` +if [[ $SYS = "Linux" ]]; then + alias grep='grep --color' + alias ls='ls --color' + alias open='xdg-open' + alias l='ls -lh --color' +fi +