Browse Source

bash/tmux/vim/i3 updates from canpango linux-desktop-1

neuraflash
Brandon Cornejo 6 years ago
parent
commit
9f7c13ba46
  1. 36
      bashrc
  2. 8
      i3status.conf
  3. 23
      tmux.conf
  4. 148
      vimrc

36
bashrc

@ -1,16 +1,9 @@
export PATH=$HOME/bin:$PATH
export EDITOR=vim
set -o vi
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
#export HISTCONTROL='ignoreboth'
#export HISTFILESIZE=2000000
#export HISTIGNORE='&:ls:exit'
#shopt -s histappend
#set cmdhist
# shopt -s checkwinsize
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
@ -23,8 +16,8 @@ case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# Get our git stuff
source ~/.git-completion.sh
source ~/.git-prompt.sh
source ~/code/dotfiles/git-completion.sh
source ~/code/dotfiles/git-prompt.sh
force_color_prompt=yes
@ -61,7 +54,6 @@ if [ -n "$force_color_prompt" ]; then
fi
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]-=[\u@\h]=-\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1="${BLUE}(${GREEN}${CWD}${BLUE}) ${NORMAL}${HOST}${BRED}${GIT}${NORMAL} [$?${NORMAL}]${GREEN} ${PUID}${NORMAL} "
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
@ -77,7 +69,7 @@ case "$TERM" in xterm*|rxvt*)
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls -X --color=auto'
alias ls='ls -CFX --color=auto'
#alias dir='dir --color=auto' alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
@ -93,21 +85,11 @@ alias l='ls -CF'
#mah aliases, son
alias atr0phy='ssh br4n@atr0phy.net'
alias at0rphy='ssh -L 9050:127.0.0.1:9050 br4n@atr0phy.net'
alias evoluent='xinput --set-button-map 12 3 1 1 4 5 7 8 9 0 10 11'
alias cloudme='cd ~/Code/django-cloud/corvisacloud && source ~/Code/django-cloud/bin/activate'
alias paybackme='cd ~/Code/payback && source ~/Code/payback/bin/activate'
alias pb='python -m payback'
alias wallaceme='cd ~/Code/wallace-io/ && node server.js -e ~/Code/wallace-sites -b redis'
alias zeusme='cd ~/Code/zeus2 && source ~/Code/zeus2/bin/activate && ./start_zeus.sh'
alias evoluent='xinput --set-button-map 14 3 1 1 4 5 7 8 9 0 10 11'
alias cls='clear && ls -X --color=auto'
alias ack="~/bin/ack"
alias ackpy="~/bin/ack -r --python --ignore-dir migrations"
alias pbtest="py.test -v -c conf/pytest-integration.ini"
alias pbtestdbg="py.test -sv -c conf/pytest-integration.ini"
alias pbdroptestdb="su postgres -c 'dropdb test_payback'"
alias notes="vim ~/Documents/Notes.txt"
alias pgwatch="tail -f /var/log/postgresql/postgresql-9.4-main.log | ccze -A"
alias postman="/opt/google/chrome/google-chrome \"--profile-directory=Profile 1\" --app-id=fhbjgbiflinjbdggehcddcbncdddomop"
alias notes="vim +VimwikiIndex"
alias tmpvim="vim /tmp/$(uuid)"
alias snip="scrot -s ~/Documents/screenshots/%b%d-%H:%M.png"
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
@ -180,3 +162,7 @@ alias cbhs="cat $HISTFILE | tail -n 1 | cb"
# ASCII ART GOODNESS
echo -e "$(<~/.motd)"
# Search command history
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'

8
i3status.conf

@ -12,7 +12,7 @@ general {
}
order += "disk /"
order += "ethernet eth0"
order += "ethernet eno1"
order += "load"
order += "tztime local"
@ -21,10 +21,10 @@ wireless wlan0 {
format_down = "W: down"
}
ethernet eth0 {
ethernet eno1 {
# if you use %speed, i3status requires root privileges
format_up = "eth0: %ip (%speed)"
format_down = "eth0: down"
format_up = "eno1: %ip (%speed)"
format_down = "eno1: down"
}
battery 0 {

23
tmux.conf

@ -1,4 +1,3 @@
set-option -g default-command "reattach-to-user-namespace -l bash"
set-option -g prefix C-a
bind-key C-a last-window
set -g default-terminal "screen-256color"
@ -13,20 +12,14 @@ set-option -g mouse on
# Prevent renaming windows (use <C-a ,> to rename)
set-option -g allow-rename off
# Let titles propogate up to the terminal emulator
set-option -g set-titles on
set-option -g set-titles-string "#W - TMUX"
# Status bar stuff
set -g status-keys vi
set -g status-interval 5
# Design stuff, likely to change
#set -g status-attr bright
#set -g status-bg colour65
#set -g status-left-length 20
#set -g status-left '#[fg=white][#[fg=colour122]#S#[fg=white]]#[default]'
#set -g status-justify centre
#set -g status-right '#[fg=colour222]%m/%d %I:%M:%S#[default]'
#setw -g window-status-current-format ' #[fg=white](#[fg=colour11]#I.#P#F#W#[fg=white])#[default]'
#setw -g window-status-format '#I#F#W'
# New Design
set -g status-justify left
set -g status-bg default
@ -48,7 +41,7 @@ setw -g window-status-bg green
setw -g window-status-fg black
setw -g window-status-attr reverse
# Info on left (I don't have a session display for now)
# Info on left
set -g status-left ''
# The panes {
@ -89,6 +82,6 @@ set -g message-bg colour166
# }
# Plugins {
run-shell ~/.tmux/tmux-resurrect/ressurrect.tmux
# }
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle

148
vimrc

@ -0,0 +1,148 @@
" system stuff
filetype off " for now, enabled after Vundle
set nocompatible " disable vi compatibility
set shell=/bin/bash " set our shell, always bash
set laststatus=2 " always show a status-bar
set encoding=utf-8 " always be unicode-ing
set hidden " hide abandoned buffers, don't close
set mouse=a " enable mouse support everywhere
set vb
set t_vb=
" aesthetics
syntax enable " enable syntax processing
set scrolloff=4 " always show 5 lines above/below cursor
set sidescrolloff=5 " always show 5 chars over
set display=lastline " show as much as possible, no @s
set colorcolumn=80 " show bar at column # as a guide (pep8)
set noshowmode " no need to show mode, we have a status line
" tabs
set expandtab " make any tabs into spaces
set tabstop=4 " turn them into 4 spaces
set softtabstop=4 " even in insert mode
set shiftwidth=4 " also 4 spaces for <</>> indenting
" interface
set nowrap " never wrap long lines
set number " show line numbers
set relativenumber " show numbers relative to current line
set cursorline " highlight currently selected line
set wildmenu " command autocomplete bar
"set lazyredraw " redraw only when needed
set showmatch " highlight matching brackets/parens
set incsearch " real-time searching while typing
set hlsearch " highlight search matches
set autoindent " auto-match surrounding indentation for newlines
set backspace=indent,start " let backspace delete autoindent, not eol
" folding
set foldenable " turn on vim folding
set foldnestmax=8 " stay out of fold-hell, only 10-deep
set foldmethod=indent " unless told otherwise, fold on indents
" set Vundle runtime path and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Plugins for Vundle to handle
Plugin 'VundleVim/Vundle.vim' " handle Vundle itself
Plugin 'fholgado/minibufexpl.vim' " mini-buffer explorer (tabs at top)
Plugin 'itchyny/lightline.vim' " status bar replacement
Plugin 'maximbaz/lightline-ale' " add ale info to lightline
Plugin 'Lokaltog/vim-distinguished.git' " ancient color-scheme, should replace
Plugin 'scrooloose/nerdtree.git' " file explorer
Plugin 'ervandew/supertab.git' " override tab function
Plugin 'nvie/vim-flake8.git' " flake-8
Plugin 'kien/rainbow_parentheses.vim.git'
Plugin 'hynek/vim-python-pep8-indent'
Plugin 'tmhedberg/SimpylFold'
Plugin 'w0rp/ale'
Plugin 'vimwiki/vimwiki.git'
Plugin 'chrisbra/csv.vim'
Plugin 'davidhalter/jedi-vim'
" end vundle setup
call vundle#end()
colorscheme distinguished " such colours
" autocmd check
if has("autocmd")
filetype plugin indent on " enable filetype detection
" set filetypes in odd extensions for decent highlighting
autocmd BufNewFile,BufRead *.djhtml set filetype=html
autocmd BufNewFile,BufRead *.raml set filetype=yaml
autocmd BufNewFile,BufRead *.rst set filetype=rust
autocmd BufNewFile,BufRead *.cls set filetype=apexcode
" for rainbow parentheses plugin
autocmd VimEnter * RainbowParenthesesToggle
autocmd Syntax * RainbowParenthesesLoadRound
autocmd Syntax * RainbowParenthesesLoadSquare
autocmd Syntax * RainbowParenthesesLoadBraces
endif
" [COMMANDS]
" close html/xml tags with a hotkey
imap ,/ </<C-X><C-O>
" turn off search-highlighting
nnoremap <leader><space> :nohlsearch<CR>
" highlight last inserted text
nnoremap gV `[v`]
" show invisible characters
nmap <leader>l :set list!<CR>
set listchars=tab:▸\ ,eol
" don't be a noob - disable arrow keys everywhere
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
" [PLUGIN COMMANDS]
" show nerd-tree bar
nmap <leader>e :NERDTreeToggle<CR>
" validate xml
nmap <leader>; :%w !xmllint --valid --noout -
" navigate ALE errors
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)
" [Ale Settings]
let g:ale_completion_enabled = 1
let g:ale_echo_msg_format = '[%linter%] %s'
let g:ale_fixers = {
\'python': ['yapf', 'autopep8', 'isort'],
\}
let g:lightline = {
\'colorscheme': 'default',
\'component_expand': {
\'linter_warnings': 'lightline#ale#warnings',
\'linter_errors': 'lightline#ale#errors',
\'linter_ok': 'lightline#ale#ok',
\},
\'component_type': {
\'linter_warnings': 'warning',
\'linter_errors': 'error',
\},
\'active': {
\'right': [['lineinfo'],['percent'],['fileformat', 'fileencoding', 'filetype'],['linter_errors', 'linter_warnings', 'linter_ok']]
\},
\}
Loading…
Cancel
Save