From b82312b27cca6b6ed22dddaf6b403186edf3d359 Mon Sep 17 00:00:00 2001 From: steveokard Date: Fri, 1 Sep 2017 21:36:40 -0400 Subject: [PATCH] reconfigured for antibody --- .aliases.zsh | 36 +++++++++++++++++ .zshrc | 106 ++++++++++++++++++++------------------------------- init.sh | 10 +++-- 3 files changed, 83 insertions(+), 69 deletions(-) create mode 100644 .aliases.zsh diff --git a/.aliases.zsh b/.aliases.zsh new file mode 100644 index 0000000..5d6564b --- /dev/null +++ b/.aliases.zsh @@ -0,0 +1,36 @@ +#Readability aliases +alias lss='ls -alh --color=auto' +alias mount='mount |column -t' +alias df='df -H' +#Shell Function aliases +alias dirs="dirs -v" +alias h='history' +alias j='jobs -l' +#shortcuts aliases +alias please="sudo !!" +alias ping='ping -c 5' +alias ax="chmod a+x" +alias wmip="curl icanhazip.com" +#git aliases +alias gitS='git status' +alias gitL='git log' +alias gitD='git diff' +#Apt aliases +alias aptup="sudo apt update && sudo apt upgrade" +alias aptrm="sudo apt autoremove && sudo apt autoclean" +#Combo aliases +mcd() { mkdir -p "$1"; cd "$1";} #make a directory and cd into it +cls() { cd "$1"; ls;} #cd into directory and list contents +md5check() { md5sum "$1" | grep "$2";} #md5sum file, compare to md5sum as second parameter +#ssh aliases +alias ssh-agent="eval `ssh-agent -s`" + +#Command Replacement aliases +alias less='less -imJMW' + +#Navigation aliases +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' + diff --git a/.zshrc b/.zshrc index 1a7cda6..65c04b8 100644 --- a/.zshrc +++ b/.zshrc @@ -1,18 +1,43 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH +export TERM="xterm-256color" +#zsh options +setopt auto_cd +setopt complete_aliases +setopt extended_glob +setopt hist_ignore_all_dups +setopt share_history +setopt list_types +setopt mark_dirs +setopt path_dirs -# Path to your oh-my-zsh installation. - export ZSH=/home/`whoami`/.oh-my-zsh +#alias/prefs +export VISUAL="/usr/bin/vim" +export EDITOR="$VISUAL" +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=3' +alias tmux="tmux -2" +source ~/.aliases.zsh +#init powerline +. /usr/share/powerline/bindings/zsh/powerline.zsh + +#Antibody Init +source <(antibody init) +#antibody bundles +antibody bundle bhilburn/powerlevel9k +antibody bundle chrissicool/zsh-256color +antibody bundle zlsun/solarized-man + + +antibody bundle zsh-users/zsh-autosuggestions +antibody bundle zsh-users/zsh-syntax-highlighting # Set name of the theme to load. Optionally, if you set this to "random" # it'll load a random theme each time that oh-my-zsh is loaded. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes -if [[ -n "$SSH_CLIENT" ]] -then - ZSH_THEME="bureau" -else - ZSH_THEME="agnoster" -fi +#if [[ -n "$SSH_CLIENT" ]] +#then +# ZSH_THEME="bureau" +#else +# ZSH_THEME="agnoster" +#fi # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" @@ -55,61 +80,12 @@ fi # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(colored-man-pages copydir cp fasd git gitignore jump systemd tmux vi-mode zsh-autosuggestions) +#plugins=(colored-man-pages copydir cp fasd git gitignore jump systemd tmux vi-mode zsh-autosuggestions) -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# ssh -# export SSH_KEY_PATH="~/.ssh/rsa_id" - -# Set personal aliases, overriding those provided by oh-my-zsh libs, -# plugins, and themes. Aliases can be placed here, though oh-my-zsh -# users are encouraged to define aliases within the ZSH_CUSTOM folder. -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" -export VISUAL="/usr/bin/vim" -export EDITOR="$VISUAL" -ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=3' -alias tmux="tmux -2" - -if [[ -z "$SSH_CLIENT" ]] -then - . /usr/share/powerline/bindings/zsh/powerline.zsh -fi - -#zsh options -setopt auto_cd -setopt complete_aliases -setopt extended_glob -setopt hist_ignore_all_dups -setopt share_history -setopt list_types -setopt mark_dirs -setopt path_dirs #Set caps to escape when tapped and ctrl when held -if [[ -n "$SSH_CLIENT" ]] - then - setxkbmap -option 'caps:ctrl_modifier' - xcape -e 'Caps_Lock=Escape' - fi +#if [[ -n "$SSH_CLIENT" ]] +# then +# setxkbmap -option 'caps:ctrl_modifier' +# xcape -e 'Caps_Lock=Escape' +# fi diff --git a/init.sh b/init.sh index 739c136..3d21dea 100755 --- a/init.sh +++ b/init.sh @@ -7,16 +7,18 @@ rm -ri ~/.tmux.conf rm -ri ~/.zsh-custom rm -ri ~/.vimrc rm -ri ~/.vim -rm -ri ~/.oh-my-zsh rm -ri ~/.zshrc +rm -ri ~/.aliases.zsh #make links -#ln -s /home/`whoami`/stevset/.bash_aliases /home/`whoami`/.bash_aliases -#ln -s /home/`whoami`/stevset/.bashrc /home/`whoami`/.bashrc 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/.oh-my-zsh /home/`whoami`/.oh-my-zsh 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 + +#Download Antigen +curl -sL https://git.io/antibody | bash -s +echo 'source <(antibody init)' >> ~/.zshrc #set new shell echo "set new shell to zsh"