Repository: flipsidecreations/dotfiles Branch: master Commit: 8ab0390ea959 Files: 12 Total size: 29.0 KB Directory structure: gitextract_3jcq12__/ ├── .bash_aliases ├── .bash_exports ├── .bash_profile ├── .bash_wrappers ├── .bashrc ├── .screenrc ├── .tmux.conf ├── .vimrc ├── .zshrc ├── README.md ├── install.sh └── uninstall.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .bash_aliases ================================================ alias gti='git' #alias tmux='tmux -2' alias less='less -R' alias diff='colordiff' alias dc='cd' alias nethack-online='ssh nethack@nethack.alt.org ; clear' alias tron-online='ssh sshtron.zachlatta.com ; clear' alias glog='git log --oneline --graph --color --all --decorate' ================================================ FILE: .bash_exports ================================================ export TERM=xterm-256color export LESS='-R' export LESSOPEN='|~/.lessfilter %s' # perl plenv # export PATH="$HOME/.plenv/bin:$PATH" # eval "$(plenv init -)" # golang export GOPATH=~/gocode export PATH="$GOPATH/bin:${PATH}:/usr/local/go/bin" # ruby rbenv export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)" export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH" export EDITOR=/usr/bin/vim ================================================ FILE: .bash_profile ================================================ if [ -n "$TMUX" ]; then # called inside tmux session, do tmux things . ~/.profile fi # Trigger ~/.bashrc commands . ~/.bashrc ================================================ FILE: .bash_wrappers ================================================ # colored man pages man() { env LESS_TERMCAP_mb=$'\E[01;31m' \ LESS_TERMCAP_md=$'\E[01;38;5;74m' \ LESS_TERMCAP_me=$'\E[0m' \ LESS_TERMCAP_se=$'\E[0m' \ LESS_TERMCAP_so=$'\E[01;33;03;40m' \ LESS_TERMCAP_ue=$'\E[0m' \ LESS_TERMCAP_us=$'\E[04;38;5;146m' \ man "$@" } whatsgoingon() { for i in $(find . -maxdepth 1 -type d | sed -e 's/\.\///' -e '/\./d'); do pushd $i >/dev/null echo "$(tput bold)$i$(tput sgr0)" if [ -z "$(git status --porcelain)" ]; then echo "is clean" else git status -s fi popd >/dev/null done } ================================================ FILE: .bashrc ================================================ # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar # make less more friendly for non-text input files, see lesspipe(1) #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in xterm-color|*-256color) color_prompt=yes;; esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # We have color support; assume it's compliant with Ecma-48 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such # a case would tend to support setf rather than setaf.) color_prompt=yes else color_prompt= fi fi if [ "$color_prompt" = yes ]; then prompt_color='\[\033[;32m\]' info_color='\[\033[1;34m\]' prompt_symbol=📛 if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user prompt_color='\[\033[;94m\]' info_color='\[\033[1;31m\]' prompt_symbol=💀 fi PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}('$info_color'\u${prompt_symbol}\h'$prompt_color')-[\[\033[0;1m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[0m\] ' # BackTrack red prompt #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" ;; *) ;; esac # enable color support of ls, less and man, and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias diff='diff --color=auto' alias ip='ip --color=auto' export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink export LESS_TERMCAP_md=$'\E[1;36m' # begin bold export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video export LESS_TERMCAP_se=$'\E[0m' # reset reverse video export LESS_TERMCAP_us=$'\E[1;32m' # begin underline export LESS_TERMCAP_ue=$'\E[0m' # reset underline fi # colored GCC warnings and errors #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # some more ls aliases alias ll='ls -l' alias la='ls -A' alias l='ls -CF' # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi ================================================ FILE: .screenrc ================================================ # GNU Screen - main configuration file # Allow bold colors - necessary for some reason attrcolor b ".I" # Tell screen how to set colors. AB = background, AF=foreground termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' # Enables use of shift-PgUp and shift-PgDn termcapinfo xterm|xterms|xs|rxvt ti@:te@ # Erase background with current bg color defbce "on" # Enable 256 color term term xterm-256color # Cache 30000 lines for scroll back defscrollback 30000 hardstatus alwayslastline # Very nice tabbed colored hardstatus line hardstatus string '%{= Kd} %{= Kd}%-w%{= Kr}[%{= KW}%n %t%{= Kr}]%{= Kd}%+w %-= %{KG} %H%{KW}|%{KY}%101`%{KW}|%D %M %d %Y%{= Kc} %C%A%{-}' # change command character from ctrl-a to ctrl-b (emacs users may want this) #escape ^Bb # Hide hardstatus: ctrl-a f bind f eval "hardstatus ignore" # Show hardstatus: ctrl-a F bind F eval "hardstatus alwayslastline" ================================================ FILE: .tmux.conf ================================================ # Make it use C-a, similar to screen.. #unbind C-b #set -g prefix C-a set -g default-terminal "screen-256color" set -g history-limit 50000 # Tmux mouse mode set-option -g mouse on ## Enable mouse with 'm' and disable with 'M' unbind m bind m \ set -g mouse on \;\ display 'Mouse: ON' unbind M bind M \ set -g mouse off \;\ display 'Mouse: OFF' # THEME set -g status-bg colour235 set -g status-fg yellow #set-option -g status-attr dim #set-window-option -g window-status-current-fg brightred #orange #set-window-option -g window-status-current-bg colour236 #set-window-option -g window-status-current-attr bright set -g status-interval 60 set -sg escape-time 1000 set-option -g base-index 1 setw -g aggressive-resize on set -g status-justify centre #set -g status-left '#[fg=green]#(whoami)@#H#[default]' set -g status-left-length 70 set -g status-left "#[fg=yellow]#(ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print \"Local \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #(ifconfig ppp0 | grep 'inet ' | awk '{print \"vpn \" $2}')" # show session name, window & pane number, date and time on right side of status bar set -g status-right-length 60 set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %l:%M %p :: #(date -u | awk '{print $4}')::" # set pane colors - hilight the active pane #set-option -g pane-border-fg colour235 #base02 #set-option -g pane-active-border-fg colour240 #base01 # use PREFIX | to split window horizontally and PREFIX - to split vertically #bind | split-window -h #bind - split-window -v # Make the current window the first window #bind T swap-window -t 1 # and use C-h and C-l to cycle thru panes #bind -r C-h select-window -t :- #bind -r C-l select-window -t :+ #bind ` copy-mode #bind p paste-buffer # Resize window with alt arrow keys bind-key -n C-S-Up resize-pane -U 10 bind-key -n C-S-Down resize-pane -D 10 bind-key -n C-S-Left resize-pane -L 10 bind-key -n C-S-Right resize-pane -R 10 # Rename window with ctrl a r #bind-key -r r command-prompt 'rename-window %%' # Reorder windows #bind R \ # move-window -r\; \ # display-message "Windows reordered..." ## pane border and colors #set-option -g pane-active-border-fg yellow #set-option -g pane-border-fg white ================================================ FILE: .vimrc ================================================ " execute pathogen#infect() set mouse= set ttymouse= " Allow saving of files as sudo when I forgot to start vim using sudo. cmap w!! w !sudo tee > /dev/null % " Highlight characters over 80 "augroup vimrc_autocmds " autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#111111 " autocmd BufEnter * match OverLength /\%81v.*/ "augroup END " Make Vim able to edit crontab files again. set backupskip=/tmp/*,/private/tmp/* set backup " enable backups set noswapfile " it's 2015, Vim. set undodir=~/.vim/tmp/undo// " undo files set backupdir=~/.vim/tmp/backup// " backups set directory=~/.vim/tmp/swap// " swap files " Make those folders automatically if they don't already exist. if !isdirectory(expand(&undodir)) call mkdir(expand(&undodir), "p") endif if !isdirectory(expand(&backupdir)) call mkdir(expand(&backupdir), "p") endif if !isdirectory(expand(&directory)) call mkdir(expand(&directory), "p") endif " Resize splits when the window is resized au VimResized * :wincmd = set modelines=1 set showmode set history=700 set undofile set undoreload=10000 set matchtime=3 set splitbelow set splitright set autowrite set autoread set shiftround set title set linebreak set colorcolumn=+1 " Enable filetype plugins filetype plugin on filetype indent on "Always show current position set ruler "Clipboard stuff set clipboard=unnamedplus " Height of the command bar set cmdheight=2 " A buffer becomes hidden when it is abandoned set hid " Configure backspace so it acts as it should act set backspace=eol,start,indent set whichwrap+=<,>,h,l " Ignore case when searching set ignorecase " When searching try to be smart about cases set smartcase " Highlight search results set hlsearch " Makes search act like search in modern browsers set incsearch " Don't redraw while executing macros (good performance config) set lazyredraw " For regular expressions turn magic on set magic " Show matching brackets when text indicator is over them set showmatch " No annoying sound on errors set noerrorbells set novisualbell set t_vb= "http://sunaku.github.io/vim-256color-bce.html set t_ut= set tm=500 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Colors and Fonts """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Sets 256 color mode if the terminal supports it set t_Co=256 " Enable syntax highlighting syntax enable set nu set background=dark "let g:solarized_termcolors=256 " colorscheme brogrammer " Set utf8 as standard encoding and en_US as the standard language set encoding=utf8 " Use Unix as the standard file type set ffs=unix,dos,mac """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Text, tab and indent related """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Use spaces instead of tabs set expandtab " Be smart when using tabs ;) set smarttab " 1 tab == 4 spaces set shiftwidth=4 set tabstop=4 " Linebreak on 500 characters set lbr set tw=500 set ai "Auto indent set si "Smart indent set wrap "Wrap lines """""""""""""""""""""""""""""" " => Visual mode related """""""""""""""""""""""""""""" " Visual mode pressing * or # searches for the current selection " Super useful! From an idea by Michael Naumann vnoremap * :call VisualSelection('f') vnoremap # :call VisualSelection('b') """""""""""""""""""""""""""""" " => Status line """""""""""""""""""""""""""""" " Always show the status line "set laststatus=1 " Format the status line "set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Moving around, tabs, windows and buffers """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Resize splits map + - map - + map > < map < > " Close the current buffer map bd :Bclose " Close all the buffers map ba :1,1000 bd! " Useful mappings for managing tabs map tn :tabnew map to :tabonly map tc :tabclose map tm :tabmove " Opens a new tab with the current buffer's path " Super useful when editing files in the same directory map te :tabedit =expand("%:p:h")/ " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd " Specify the behavior when switching between buffers try set switchbuf=useopen,usetab,newtab set stal=2 catch endtry " Return to last edit position when opening files (You want this!) autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal! g`\"" | \ endif " Remember info about open buffers on close set viminfo^=% " Vim split options " Remaps ctrl w + $key to ctrl $key " ctrl j = move right nnoremap " ctrl k = move up nnoremap " ctrl l = move down nnoremap " ctrl h = move left nnoremap """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Helper functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" function! CmdLine(str) exe "menu Foo.Bar :" . a:str emenu Foo.Bar unmenu Foo endfunction function! VisualSelection(direction) range let l:saved_reg = @" execute "normal! vgvy" let l:pattern = escape(@", '\\/.*$^~[]') let l:pattern = substitute(l:pattern, "\n$", "", "") if a:direction == 'b' execute "normal ?" . l:pattern . "^M" elseif a:direction == 'gv' call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.') elseif a:direction == 'replace' call CmdLine("%s" . '/'. l:pattern . '/') elseif a:direction == 'f' execute "normal /" . l:pattern . "^M" endif let @/ = l:pattern let @" = l:saved_reg endfunction " Returns true if paste mode is enabled function! HasPaste() if &paste return 'PASTE MODE ' en return '' endfunction " Trailing whitespace {{{ " Only shown when not in insert mode so I don't go insane. augroup trailing au! au InsertEnter * :set listchars-=trail:⌴ au InsertLeave * :set listchars+=trail:⌴ augroup END " Make sure Vim returns to the same line when you reopen a file. augroup line_return au! au BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ execute 'normal! g`"zvzz' | \ endif augroup END " Reselect last-pasted text nnoremap gp `[v`] """""""""""""""""""" " PATHOGEN PLUGINS " """""""""""""""""""" " START NERDTree if no files are specified autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif " Close NERDTree if it's the only window left open autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif " https://github.com/nathanaelkane/vim-indent-guides/issues/20 let g:indent_guides_exclude_filetypes = ['nerdtree'] " END NERDTree " START Airline let g:airline#extensions#tabline#enabled = 1 set laststatus=2 let g:airline_theme='murmur' let g:airline#extensions#hunks#enabled=0 let g:airline#extensions#branch#enabled=1 " END Airline " START windowswap let g:windowswap_map_keys = 0 "prevent default bindings nnoremap yw :call WindowSwap#MarkWindowSwap() nnoremap pw :call WindowSwap#DoWindowSwap() nnoremap ww :call WindowSwap#EasyWindowSwap() " END windowswap " START ctrlp set runtimepath^=~/.vim/bundle/ctrlp.vim " END ctrlp " START ansible-vim let g:ansible_extra_keywords_highlight = 1 let g:ansible_name_highlight = 'b' let g:ansible_extra_syntaxes = "sh.vim" func! DeleteTrailingWS() exe "normal mz" %s/\s\+$//ge exe "normal `z" endfunc autocmd BufWrite * :call DeleteTrailingWS() " START vim-hclfmt let g:hcl_fmt_autosave = 1 let g:tf_fmt_autosave = 0 let g:nomad_fmt_autosave = 1 " END vim-hclfmt nmap :call ToggleIndentGuidesSpaces() function! ToggleIndentGuidesSpaces() if exists('b:iguides_spaces') call matchdelete(b:iguides_spaces) unlet b:iguides_spaces else let pos = range(1, &l:textwidth, &l:shiftwidth) call map(pos, '"\\%" . v:val . "v"') let pat = '\%(\_^\s*\)\@<=\%(' . join(pos, '\|') . '\)\s' let b:iguides_spaces = matchadd('CursorLine', pat) endif endfunction " START vim-hashicorp-terraform let g:terraform_align = 1 " END vim-hashicorp-terraform ================================================ FILE: .zshrc ================================================ # ~/.zshrc file for zsh interactive shells. # see /usr/share/doc/zsh/examples/zshrc for examples setopt autocd # change directory just by typing its name #setopt correct # auto correct mistakes setopt interactivecomments # allow comments in interactive mode setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’ setopt nonomatch # hide error message if there is no match for the pattern setopt notify # report the status of background jobs immediately setopt numericglobsort # sort filenames numerically when it makes sense setopt promptsubst # enable command substitution in prompt WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word # hide EOL sign ('%') PROMPT_EOL_MARK="" # configure key keybindings bindkey -e # emacs key bindings bindkey ' ' magic-space # do history expansion on space bindkey '^U' backward-kill-line # ctrl + U bindkey '^[[3;5~' kill-word # ctrl + Supr bindkey '^[[3~' delete-char # delete bindkey '^[[1;5C' forward-word # ctrl + -> bindkey '^[[1;5D' backward-word # ctrl + <- bindkey '^[[5~' beginning-of-buffer-or-history # page up bindkey '^[[6~' end-of-buffer-or-history # page down bindkey '^[[H' beginning-of-line # home bindkey '^[[F' end-of-line # end bindkey '^[[Z' undo # shift + tab undo last action # enable completion features autoload -Uz compinit compinit -d ~/.cache/zcompdump zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*' auto-description 'specify: %d' zstyle ':completion:*' completer _expand _complete zstyle ':completion:*' format 'Completing %d' zstyle ':completion:*' group-name '' zstyle ':completion:*' list-colors '' zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*' rehash true zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle ':completion:*' use-compctl false zstyle ':completion:*' verbose true zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' # History configurations HISTFILE=~/.zsh_history HISTSIZE=1000 SAVEHIST=2000 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 share_history # share command history data # force zsh to show the complete history alias history="history 0" # configure `time` format TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' # make less more friendly for non-text input files, see lesspipe(1) #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in xterm-color|*-256color) color_prompt=yes;; esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # We have color support; assume it's compliant with Ecma-48 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such # a case would tend to support setf rather than setaf.) color_prompt=yes else color_prompt= fi fi configure_prompt() { prompt_symbol=😈 # Skull emoji for root terminal #[ "$EUID" -eq 0 ] && prompt_symbol=💀 case "$PROMPT_ALTERNATIVE" in twoline) PROMPT=$'%F{%(#.blue.green)}┌──${debian_chroot:+($debian_chroot)─}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))─}(%B%F{%(#.red.blue)}%n'$prompt_symbol$'%m%b%F{%(#.blue.green)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.green)}]\n└─%B%(#.%F{red}#.%F{blue}$)%b%F{reset} ' # Right-side prompt with exit codes and background processes #RPROMPT=$'%(?.. %? %F{red}%B⨯%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)' ;; oneline) PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{%(#.red.blue)}%n@%m%b%F{reset}:%B%F{%(#.blue.green)}%~%b%F{reset}%(#.#.$) ' RPROMPT= ;; backtrack) PROMPT=$'${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%B%F{red}%n@%m%b%F{reset}:%B%F{blue}%~%b%F{reset}%(#.#.$) ' RPROMPT= ;; esac unset prompt_symbol } # The following block is surrounded by two delimiters. # These delimiters must not be modified. Thanks. # START KALI CONFIG VARIABLES PROMPT_ALTERNATIVE=twoline NEWLINE_BEFORE_PROMPT=yes # STOP KALI CONFIG VARIABLES if [ "$color_prompt" = yes ]; then # override default virtualenv indicator in prompt VIRTUAL_ENV_DISABLE_PROMPT=1 configure_prompt # enable syntax-highlighting if [ -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then . /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern) ZSH_HIGHLIGHT_STYLES[default]=none ZSH_HIGHLIGHT_STYLES[unknown-token]=underline ZSH_HIGHLIGHT_STYLES[reserved-word]=fg=cyan,bold ZSH_HIGHLIGHT_STYLES[suffix-alias]=fg=green,underline ZSH_HIGHLIGHT_STYLES[global-alias]=fg=green,bold ZSH_HIGHLIGHT_STYLES[precommand]=fg=green,underline ZSH_HIGHLIGHT_STYLES[commandseparator]=fg=blue,bold ZSH_HIGHLIGHT_STYLES[autodirectory]=fg=green,underline ZSH_HIGHLIGHT_STYLES[path]=bold ZSH_HIGHLIGHT_STYLES[path_pathseparator]= ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]= ZSH_HIGHLIGHT_STYLES[globbing]=fg=blue,bold ZSH_HIGHLIGHT_STYLES[history-expansion]=fg=blue,bold ZSH_HIGHLIGHT_STYLES[command-substitution]=none ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]=fg=magenta,bold ZSH_HIGHLIGHT_STYLES[process-substitution]=none ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]=fg=magenta,bold ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=fg=green ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=fg=green ZSH_HIGHLIGHT_STYLES[back-quoted-argument]=none ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]=fg=blue,bold ZSH_HIGHLIGHT_STYLES[single-quoted-argument]=fg=yellow ZSH_HIGHLIGHT_STYLES[double-quoted-argument]=fg=yellow ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]=fg=yellow ZSH_HIGHLIGHT_STYLES[rc-quote]=fg=magenta ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]=fg=magenta,bold ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]=fg=magenta,bold ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]=fg=magenta,bold ZSH_HIGHLIGHT_STYLES[assign]=none ZSH_HIGHLIGHT_STYLES[redirection]=fg=blue,bold ZSH_HIGHLIGHT_STYLES[comment]=fg=black,bold ZSH_HIGHLIGHT_STYLES[named-fd]=none ZSH_HIGHLIGHT_STYLES[numeric-fd]=none ZSH_HIGHLIGHT_STYLES[arg0]=fg=cyan ZSH_HIGHLIGHT_STYLES[bracket-error]=fg=red,bold ZSH_HIGHLIGHT_STYLES[bracket-level-1]=fg=blue,bold ZSH_HIGHLIGHT_STYLES[bracket-level-2]=fg=green,bold ZSH_HIGHLIGHT_STYLES[bracket-level-3]=fg=magenta,bold ZSH_HIGHLIGHT_STYLES[bracket-level-4]=fg=yellow,bold ZSH_HIGHLIGHT_STYLES[bracket-level-5]=fg=cyan,bold ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]=standout fi else PROMPT='${debian_chroot:+($debian_chroot)}%n@%m:%~%(#.#.$) ' fi unset color_prompt force_color_prompt toggle_oneline_prompt(){ if [ "$PROMPT_ALTERNATIVE" = oneline ]; then PROMPT_ALTERNATIVE=twoline else PROMPT_ALTERNATIVE=oneline fi configure_prompt zle reset-prompt } zle -N toggle_oneline_prompt bindkey ^P toggle_oneline_prompt # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty) TERM_TITLE=$'\e]0;${debian_chroot:+($debian_chroot)}${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV))}%n@%m: %~\a' ;; *) ;; esac precmd() { # Print the previously configured title print -Pnr -- "$TERM_TITLE" # Print a new line before the prompt, but only if it is not the first line if [ "$NEWLINE_BEFORE_PROMPT" = yes ]; then if [ -z "$_NEW_LINE_BEFORE_PROMPT" ]; then _NEW_LINE_BEFORE_PROMPT=1 else print "" fi fi } # enable color support of ls, less and man, and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias diff='diff --color=auto' alias ip='ip --color=auto' export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink export LESS_TERMCAP_md=$'\E[1;36m' # begin bold export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video export LESS_TERMCAP_se=$'\E[0m' # reset reverse video export LESS_TERMCAP_us=$'\E[1;32m' # begin underline export LESS_TERMCAP_ue=$'\E[0m' # reset underline # Take advantage of $LS_COLORS for completion as well zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' fi # some more ls aliases alias ll='ls -l' alias la='ls -A' alias l='ls -CF' # enable auto-suggestions based on the history if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then . /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh # change suggestion color ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999' fi # enable command-not-found if installed if [ -f /etc/zsh_command_not_found ]; then . /etc/zsh_command_not_found fi ================================================ FILE: README.md ================================================ # Installation ### Download and change folder ``` cd ~ git clone https://github.com/flipsidecreations/dotfiles.git cd dotfiles ``` ### Run install ``` ./install.sh ``` # Uninstallation ### Change to dotfiles folder ``` cd ~/dotfiles ``` ### Run uninstaller ``` ./uninstall.sh ``` ================================================ FILE: install.sh ================================================ #!/bin/bash # Find all dot files then if the original file exists, create a backup # Once backed up to {file}.dtbak symlink the new dotfile in place for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do if [ -e ~/$file ]; then mv -f ~/$file{,.dtbak} fi ln -s $PWD/$file ~/$file done # Install vim-addons ZSH and ZSH extras echo "installing extras" sudo apt update && sudo apt -y install vim-scripts zsh zsh-syntax-highlighting zsh-autosuggestions echo "Installed" echo "use chsh -s /bin/zsh to switch to ZSH shell" ================================================ FILE: uninstall.sh ================================================ #!/bin/bash # Loop through all the dotfiles, if the file is a symlink then remove it # Then if the backup file exists, restore it to it's original location for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do if [ -h ~/$file ]; then rm -f ~/$file fi if [ -e ~/${file}.dtbak ]; then mv -f ~/$file{.dtbak,} fi done echo "Uninstalled"