From 42dd2b580231a4bc100fef8796a74026aefc7d2a Mon Sep 17 00:00:00 2001 From: steveokard Date: Sat, 2 Sep 2017 14:54:15 -0400 Subject: [PATCH] more modulated --- .tmux.conf | 4 ++-- .aliases.zsh => .zsh/aliases.zsh | 9 +-------- .zsh/directories.zsh | 34 ++++++++++++++++++++++++++++++++ .zsh/history.zsh | 24 ++++++++++++++++++++++ .zshrc | 28 ++++---------------------- ReadMe => README.md | 0 init.sh | 4 ++-- 7 files changed, 67 insertions(+), 36 deletions(-) rename .aliases.zsh => .zsh/aliases.zsh (85%) create mode 100644 .zsh/directories.zsh create mode 100644 .zsh/history.zsh rename ReadMe => README.md (100%) diff --git a/.tmux.conf b/.tmux.conf index b1bc6c0..b5ea345 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -26,7 +26,7 @@ source "/usr/share/powerline/bindings/tmux/powerline.conf" set-option -g renumber-windows on setw -g monitor-activity on set -g visual-activity on -set -g status-justify centre +#set -g status-justify centre set -g status-utf8 on #### COLOUR (Solarized dark) @@ -69,4 +69,4 @@ set-window-option -g window-status-bell-style fg=black,bg=red #base02, red set -g base-index 1 # start with pane 1 -set -g pane-base-index 1 \ No newline at end of file +set -g pane-base-index 1 diff --git a/.aliases.zsh b/.zsh/aliases.zsh similarity index 85% rename from .aliases.zsh rename to .zsh/aliases.zsh index 5d6564b..345cdee 100644 --- a/.aliases.zsh +++ b/.zsh/aliases.zsh @@ -26,11 +26,4 @@ md5check() { md5sum "$1" | grep "$2";} #md5sum file, compare to md5sum as second alias ssh-agent="eval `ssh-agent -s`" #Command Replacement aliases -alias less='less -imJMW' - -#Navigation aliases -alias ..='cd ..' -alias ...='cd ../..' -alias ....='cd ../../..' -alias .....='cd ../../../..' - +alias less='less -imJMW' \ No newline at end of file diff --git a/.zsh/directories.zsh b/.zsh/directories.zsh new file mode 100644 index 0000000..a50a692 --- /dev/null +++ b/.zsh/directories.zsh @@ -0,0 +1,34 @@ +# Changing/making/removing directory +setopt auto_pushd +setopt pushd_ignore_dups +setopt pushdminus + +alias -g ...='../..' +alias -g ....='../../..' +alias -g .....='../../../..' +alias -g ......='../../../../..' + +alias -- -='cd -' +alias 1='cd -' +alias 2='cd -2' +alias 3='cd -3' +alias 4='cd -4' +alias 5='cd -5' +alias 6='cd -6' +alias 7='cd -7' +alias 8='cd -8' +alias 9='cd -9' + +alias md='mkdir -p' +alias rd=rmdir +alias d='dirs -v | head -10' + +# List directory contents +alias lsa='ls -lah' +alias l='ls -lah' +alias ll='ls -lh' +alias la='ls -lAh' + +# Push and pop directories on directory stack +alias pu='pushd' +alias po='popd' diff --git a/.zsh/history.zsh b/.zsh/history.zsh new file mode 100644 index 0000000..5de71c2 --- /dev/null +++ b/.zsh/history.zsh @@ -0,0 +1,24 @@ +## Command history configuration +if [ -z "$HISTFILE" ]; then + HISTFILE=$HOME/.zsh_history +fi + +HISTSIZE=10000 +SAVEHIST=10000 + +# Show history +case $HIST_STAMPS in + "mm/dd/yyyy") alias history='fc -fl 1' ;; + "dd.mm.yyyy") alias history='fc -El 1' ;; + "yyyy-mm-dd") alias history='fc -il 1' ;; + *) alias history='fc -l 1' ;; +esac + +setopt append_history +setopt extended_history +setopt hist_expire_dups_first +setopt hist_ignore_dups # ignore duplication command history list +setopt hist_ignore_space +setopt hist_verify +setopt inc_append_history +setopt share_history # share command history data diff --git a/.zshrc b/.zshrc index 8c19b88..5aebaeb 100644 --- a/.zshrc +++ b/.zshrc @@ -13,35 +13,15 @@ setopt list_types setopt mark_dirs setopt path_dirs -#History settings -if [ -z "$HISTFILE" ]; then - HISTFILE=$HOME/.zsh_history - fi +#Load libraries +source ~/.zsh/aliases.zsh +source ~/.zsh/directories.zsh +source ~/.zsh/history.zsh - HISTSIZE=10000 - SAVEHIST=10000 - - # Show history - case $HIST_STAMPS in - "mm/dd/yyyy") alias history='fc -fl 1' ;; - "dd.mm.yyyy") alias history='fc -El 1' ;; - "yyyy-mm-dd") alias history='fc -il 1' ;; - *) alias history='fc -l 1' ;; - esac - - setopt append_history - setopt extended_history - setopt hist_expire_dups_first - setopt hist_ignore_dups # ignore duplication command history list - setopt hist_ignore_space - setopt hist_verify - setopt inc_append_history - setopt share_history # share command history data #alias/prefs export VISUAL="/usr/bin/vim" export EDITOR="$VISUAL" alias tmux="tmux -2" -source ~/.aliases.zsh #source /usr/share/autojump/autojump.sh #init powerline diff --git a/ReadMe b/README.md similarity index 100% rename from ReadMe rename to README.md diff --git a/init.sh b/init.sh index 3d21dea..380980d 100755 --- a/init.sh +++ b/init.sh @@ -8,13 +8,13 @@ rm -ri ~/.zsh-custom rm -ri ~/.vimrc rm -ri ~/.vim rm -ri ~/.zshrc -rm -ri ~/.aliases.zsh + #make links ln -s /home/`whoami`/stevset/.tmux.conf /home/`whoami`/.tmux.conf ln -s /home/`whoami`/stevset/.zshrc /home/`whoami`/.zshrc ln -s /home/`whoami`/stevset/.vim /home/`whoami`/.vim ln -s /home/`whoami`/stevset/.vimrc /home/`whoami`/.vimrc -ln -s /home/`whoami`/stevset/.aliases.zsh /home/`whoami`/.aliases.zsh +ln -s /home/`whoami`/stevset/.zsh /home/`whoami`/.zsh #Download Antigen curl -sL https://git.io/antibody | bash -s