~pvsr/dotfiles

856b9925a88e30b0d6e5163b5e4ad60e899c7038 — Peter Rice 5 years ago d0bfac5
a lot of stuff
9 files changed, 302 insertions(+), 94 deletions(-)

M X11/.Xresources -rwxr-xr-x => -rw-r--r--
A bin/bin/base16-harmonic16.dark.sh
M emacs/.spacemacs -rwxr-xr-x => -rw-r--r--
M i3/.config/i3/config -rwxr-xr-x => -rw-r--r--
M i3blocks/.i3blocks.conf -rwxr-xr-x => -rw-r--r--
M nvim/.config/nvim/init.vim
M qutebrowser/.config/qutebrowser/qutebrowser.conf
M zsh/.zshenv
M zsh/.zshrc
M X11/.Xresources => X11/.Xresources +26 -37
@@ 1,53 1,42 @@
Xft.antialias: 1
Xft.autohint:  0
Xft.dpi:       96
Xft.hinting:   1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba:      rgb

URxvt*font: xft:Sauce Code Powerline:regular:size=9,xft:droidsansjapanese:size=9,xft:dejavusansmono:size=9
URxvt*boldFont: xft:Sauce Code Powerline:bold:size=9,xft:droidsansjapanese:bold:size=9,xft:dejavusansmono:bold:size=9
URxvt*italicFont: xft:Sauce Code Powerline:italic:size=9,xft:droidsansjapanese:italic:size=9,xft:dejavusansmono:italic:size=9
URxvt*boldItalicFont: xft:Sauce Code Powerline:bold:italic:size=9,xft:droidsansjapanese:bold:italic:size=9,xft:dejavusansmono:bold:italic:size=9

Emacs.font: xft:Sauce Code Powerline:regular:size=9,xft:droidsansjapanese:size=9,xft:dejavusansmono:size=9
Emacs.font: Sauce Code Powerline-9

URxvt*scrollBar: false
URxvt*intensityStyles: false
URxvt*letterSpace: -1
URxvt*letterSpace: -2
URxvt*modifier: alt
URxvt*perl-ext-common: default,matcher
URxvt*matcher.button: 1
URxvt*url-launcher: qutebrowser

! Monokai
! #define base00 #272822
! #define base01 #383830
! #define base02 #49483e
! #define base03 #75715e
! #define base04 #a59f85
! #define base05 #f8f8f2
! #define base06 #f5f4f1
! #define base07 #f9f8f5
! #define base08 #f92672
! #define base09 #fd971f
! #define base0A #f4bf75
! #define base0B #a6e22e
! #define base0C #a1efe4
! #define base0D #66d9ef
! #define base0E #ae81ff
! #define base0F #cc6633

! Eighties
#define base00 #2d2d2d
#define base01 #393939
#define base02 #515151
#define base03 #747369
#define base04 #a09f93
#define base05 #d3d0c8
#define base06 #e8e6df
#define base07 #f2f0ec
#define base08 #f2777a
#define base09 #f99157
#define base0A #ffcc66
#define base0B #99cc99
#define base0C #66cccc
#define base0D #6699cc
#define base0E #cc99cc
#define base0F #d27b53
#define base00 #101212
#define base01 #222524
#define base02 #343837
#define base03 #474d4b
#define base04 #727977
#define base05 #8b9190
#define base06 #a7acab
#define base07 #c8cccb
#define base08 #e66789
#define base09 #e68567
#define base0A #e6c467
#define base0B #89e667
#define base0C #67e6c4
#define base0D #6789e6
#define base0E #c467e6
#define base0F #e667c8

*.background:             base00
*.foreground:             base04

A bin/bin/base16-harmonic16.dark.sh => bin/bin/base16-harmonic16.dark.sh +125 -0
@@ 0,0 1,125 @@
#!/bin/sh
# Base16 harmonic16 - Shell color setup script
# generated using Jannik Siebert's (https://github.com/janniks) harmonic16 tool

if [ "${TERM%%-*}" = 'linux' ]; then
    # This script doesn't support linux console (use 'vconsole' template instead)
    return 2>/dev/null || exit 0
fi

color00="10/12/12" # Base 00 - Black
color01="e6/67/89" # Base 08 - Red
color02="89/e6/67" # Base 0B - Green
color03="e6/c4/67" # Base 0A - Yellow
color04="67/89/e6" # Base 0D - Blue
color05="c4/67/e6" # Base 0E - Magenta
color06="67/e6/c4" # Base 0C - Cyan
color07="8b/91/90" # Base 05 - White
color08="47/4d/4b" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="c8/cc/cb" # Base 07 - Bright White
color16="e6/85/67" # Base 09
color17="e6/67/c8" # Base 0F
color18="22/25/24" # Base 01
color19="34/38/37" # Base 02
color20="72/79/77" # Base 04
color21="a7/ac/ab" # Base 06
color_foreground="8b/91/90" # Base 05
color_background="10/12/12" # Base 00
color_cursor="8b/91/90" # Base 05

if [ -n "$TMUX" ]; then
  # tell tmux to pass the escape sequences through
  # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
  printf_template="\033Ptmux;\033\033]4;%d;rgb:%s\007\033\\"
  printf_template_var="\033Ptmux;\033\033]%d;rgb:%s\007\033\\"
  printf_template_custom="\033Ptmux;\033\033]%s%s\007\033\\"
elif [ "${TERM%%-*}" = "screen" ]; then
  # GNU screen (screen, screen-256color, screen-256color-bce)
  printf_template="\033P\033]4;%d;rgb:%s\007\033\\"
  printf_template_var="\033P\033]%d;rgb:%s\007\033\\"
  printf_template_custom="\033P\033]%s%s\007\033\\"
elif [[ $- != *i* ]]; then
  # non-interactive
  alias printf=/bin/false
else
  printf_template="\033]4;%d;rgb:%s\033\\"
  printf_template_var="\033]%d;rgb:%s\033\\"
  printf_template_custom="\033]%s%s\033\\"
fi

# 16 color space
printf $printf_template 0  $color00
printf $printf_template 1  $color01
printf $printf_template 2  $color02
printf $printf_template 3  $color03
printf $printf_template 4  $color04
printf $printf_template 5  $color05
printf $printf_template 6  $color06
printf $printf_template 7  $color07
printf $printf_template 8  $color08
printf $printf_template 9  $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15

# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21

# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
  # iTerm2 proprietary escape codes
  printf $printf_template_custom Pg 8b9190 # forground
  printf $printf_template_custom Ph 101212 # background
  printf $printf_template_custom Pi 8b9190 # bold color
  printf $printf_template_custom Pj 343837 # selection color
  printf $printf_template_custom Pk 8b9190 # selected text color
  printf $printf_template_custom Pl 8b9190 # cursor
  printf $printf_template_custom Pm 101212 # cursor text
else
  printf $printf_template_var 10 $color_foreground
  printf $printf_template_var 11 $color_background
  printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi

# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor

M emacs/.spacemacs => emacs/.spacemacs +0 -0
M i3/.config/i3/config => i3/.config/i3/config +36 -11
@@ 80,6 80,24 @@ mode "resize" {
        bindcode Control+34 mode "default"
}

set $base00 #101212
set $base01 #222524
set $base02 #343837
set $base03 #474d4b
set $base04 #727977
set $base05 #8b9190
set $base06 #a7acab
set $base07 #c8cccb
set $base08 #e66789
set $base09 #e68567
set $base0A #e6c467
set $base0B #89e667
set $base0C #67e6c4
set $base0D #6789e6
set $base0E #c467e6
set $base0F #e667c8


bindsym $mod+q mode "$mode_system"
bar {
    position      top


@@ 87,20 105,20 @@ bar {
    # status_command i3status
    status_command i3blocks
    colors {
        separator #f2777a
        background #393939
        statusline #66cccc
        focused_workspace #f2f0ec #99cc99 #f2f0ec
        active_workspace #f2f0ec #cc99cc #f2f0ec
        inactive_workspace #a09f93 #d3d0c8 #2d2d2d
        urgent_workspace #d27b53 #d27b53 #f2f0ec
        separator $base08
        background $base01
        statusline $base0C
        focused_workspace $base03 $base0B $base02
        active_workspace $base03 $base0F $base02
        inactive_workspace $base04 $base07 $base01
        urgent_workspace $base02 $base09 $base01
  }
}

client.focused #99cc99 #99cc99 #393939 #99cc99
client.focused_inactive #393939 #393939 #e8e6df #cc99cc
client.unfocused #393939 #393939 #d3d0c8 #515151
client.urgent #d27b53 #d27b53 #f2f0ec #f2777a
client.focused $base0B $base0B $base01 $base01
client.focused_inactive $base01 $base01 $base07 $base01
client.unfocused $base01 $base01 $base06 $base01
client.urgent $base02 $base08 $base07 $base08

# custom shortcuts
bindcode 172 exec mpc toggle && pkill -RTMIN+11 i3blocks


@@ 112,6 130,10 @@ bindcode 122 exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+10 i3blocks
bindcode 123 exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+10 i3blocks && pkill -RTMIN+11 i3blocks
bindcode 107 exec scrot ~/Pictures/screenshots/%Y-%m-%d-%T-screenshot.png

workspace_auto_back_and_forth yes
bindsym $mod+z workspace back_and_forth
bindsym $mod+Shift+z move container to workspace back_and_forth

set $Locker i3lock && sleep 1
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {


@@ 132,8 154,11 @@ for_window [class="(?i)feh"] floating enable

for_window [class="."] border pixel 2
for_window [class="Firefox"] border pixel 0
for_window [class="cantata"] border pixel 0
for_window [class="transmission"] border pixel 0
for_window [class="qutebrowser"] border pixel 0
for_window [title="Google Chrome"] border pixel 0
for_window [class="google-chrome"] border pixel 0
for_window [class="Eclipse"] border pixel 0
for_window [class="Steam"] border pixel 0
for_window [instance="Steam.exe"] border pixel 0

M i3blocks/.i3blocks.conf => i3blocks/.i3blocks.conf +0 -0
M nvim/.config/nvim/init.vim => nvim/.config/nvim/init.vim +96 -37
@@ 1,9 1,14 @@
call plug#begin('~/.local/share/nvim/plugged')

" general
Plug 'airblade/vim-gitgutter'
Plug 'benekastah/neomake'
Plug 'chriskempson/base16-vim'
Plug 'junegunn/fzf.vim'
Plug 'ervandew/supertab'
Plug 'justinmk/vim-sneak'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'shougo/deoplete.nvim'
Plug 'tommcdo/vim-exchange'
Plug 'tpope/vim-abolish'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-repeat'


@@ 13,12 18,21 @@ Plug 'tpope/vim-unimpaired'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'

" haskell
Plug 'shougo/vimproc', { 'do': 'make'} | Plug 'eagletmt/ghcmod-vim', { 'for': 'haskell' }
Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
Plug 'neovimhaskell/haskell-vim', { 'for': 'haskell' }

" c
Plug 'zchee/deoplete-clang', { 'for': 'c' }

call plug#end()

filetype plugin indent on
syntax on

colorscheme base16-harmonic16
let base16colorspace=256
colorscheme base16-eighties
set background=dark

set number


@@ 49,7 63,7 @@ set splitright
set cursorline
set report=0

" set autochdir
set autochdir
set confirm
set undofile



@@ 81,52 95,97 @@ vnoremap < <gv
vnoremap > >gv

let mapleader="\<Space>"
map <Leader>w :w<CR>
map <Leader>q :q<CR>
map <Leader>wq :wq<CR>

map <Leader><Space> /
map <Leader><M-Space> ?
map <silent> <Leader>sc :nohlsearch<CR>

map <Leader>sc :q<CR>
map <Leader>s- :split<CR>
map <Leader>s/ :vsplit<CR>
map <Leader>sj <C-W>j
map <Leader>sk <C-W>k
map <Leader>sh <C-W>h
map <Leader>sl <C-W>l

map <Leader>bd :bdelete<CR>
map <silent> <Leader>l :bnext<CR>
map <silent> <Leader>h :bprev<CR>

map <Leader>tn :tabnew<CR>
map <Leader>to :tabonly<CR>
map <Leader>td :tabclose<CR>
map <silent> <C-j> :tabnext<CR>
map <silent> <C-k> :tabprev<CR>

nmap <Leader>fs :w<CR>
nmap <Leader>ft :NERDTreeToggle<CR>
nmap <Leader>qq :q<CR>
nmap <Leader>qa :qall<CR>
nmap <Leader>qw :wqall<CR>
nmap <Leader>zz ZZ

nmap <Leader>ss /
nmap <Leader>sS ?
nmap <silent> <Leader>sc :nohlsearch<CR>

nmap <silent> <Leader>w- :split<CR>
nmap <silent> <Leader>w/ :vsplit<CR>
nmap <Leader>wj <C-W>j
nmap <Leader>wk <C-W>k
nmap <Leader>wh <C-W>h
nmap <Leader>wl <C-W>l

nmap <silent> <Leader>bd :bdelete<CR>
nmap <silent> <Leader>bn :bnext<CR>
nmap <silent> <Leader>bp :bprev<CR>

" toggles from vim-unimpaired
" map <Leader>ttb cob  " background
" map <Leader>ttc coc  " cursorline
" map <Leader>ttd cod  " diff
" map <Leader>tth coh  " hlsearch
" map <Leader>tti coi  " ignorecase
" map <Leader>ttl col  " list
" map <Leader>ttn con  " number
" map <Leader>ttr cor  " relativenumber
" map <Leader>tts cos  " spell
" map <Leader>ttu cou  " cursorcolumn
" map <Leader>ttv cov  " virtualedit
" map <Leader>ttw cow  " wrap
" map <Leader>ttx cox  " cursorline cursorcolumn

" gitgutter
let g:gitgutter_signs = 0
let g:gitgutter_map_keys = 0
nmap [og :GitGutterSignsEnable<CR>
nmap ]og :GitGutterSignsDisable<CR>
nmap cog :GitGutterSignsToggle<CR>
nmap <Leader>gn <Plug>GitGutterNextHunk
nmap <Leader>gp <Plug>GitGutterPrevHunk
nmap <Leader>gg <Plug>GitGutterStageHunk
nmap <Leader>gu <Plug>GitGutterRevertHunk
nmap <Leader>gv <Plug>GitGutterPreviewHunk

map <Leader>; gc
nmap <Leader>;; gcc

let g:lasttab = 1
nmap <silent> <Leader>tt :exe "tabn ".g:lasttab<CR>
nmap <silent> <Leader>tj :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()

map <Leader>cc :botright cope<CR>
map <Leader>cn :cn<CR>
map <Leader>cp :cp<CR>
nmap <Leader>ce :botright cope<CR>
nmap <Leader>cn :cn<CR>
nmap <Leader>cp :cp<CR>

nmap <Leader>le :botright lope<CR>
nmap <Leader>ln :lne<CR>
nmap <Leader>lp :lp<CR>

nmap <silent> <Leader>ht :GhcModType<CR>
nmap <silent> <Leader>hT :GhcModTypeInsert<CR>
nmap <silent> <Leader>hc :GhcModTypeClear<CR>
nmap <silent> <Leader>hs :GhcModSplitFunCase<CR>

vnoremap <silent> * :call VisualSelection('f', '')<CR>
vnoremap <silent> # :call VisualSelection('b', '')<CR>

" fzf
map <Leader>ff :Files<CR>
map <Leader>bb :Buffers<CR>
map <Leader>sl :Lines<CR>
map <Leader>ww :Windows<CR>
" nmap <Leader>ff :Files<CR>
" nmap <Leader>bb :Buffers<CR>
" nmap <Leader>sl :Lines<CR>
" nmap <Leader>ww :Windows<CR>

" sneak
let g:sneak#streak = 1

" airline
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#hunks#non_zero_only = 1

" deoplete
let g:deoplete#enable_at_startup = 1

" neco-ghc
let g:necoghc_enable_detailed_browse = 1

" neomake
autocmd! BufWritePost * Neomake

M qutebrowser/.config/qutebrowser/qutebrowser.conf => qutebrowser/.config/qutebrowser/qutebrowser.conf +12 -4
@@ 891,9 891,11 @@ enable-pdfjs = true
#     Mode to use for hints.
#         number: Use numeric hints.
#         letter: Use the chars in the hints -> chars setting.
#         word: Use hints words based on the html elements and the extra
#     words.
#     Default: letter
#
# chars (String):
# chars (UniqueCharString):
#     Chars used for hint strings.
#     Default: asdfghjkl
#


@@ 912,8 914,13 @@ enable-pdfjs = true
#     Valid values: true, false
#     Default: false
#
# dictionary (File):
#     The dictionary file to be used by the word hints.
#     Default: /usr/share/dict/words
#
# auto-follow (Bool):
#     Whether to auto-follow a hint if there's only one left.
#     Follow a hint immediately when the hint text is completely
#     matched.
#     Valid values: true, false
#     Default: true
#


@@ 932,6 939,7 @@ chars = asdfghjkl
min-chars = 1
scatter = true
uppercase = false
dictionary = /usr/share/dict/words
auto-follow = true
next-regexes = \bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b,\bcontinue\b
prev-regexes = \bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,\b(<<|«)\b


@@ 1321,8 1329,8 @@ webpage.bg = #f9f8f5
# _monospace (Font):
#     Default monospace fonts.
#     Default: Terminus, Monospace, "DejaVu Sans Mono", Monaco,
#     "Bitstream Vera Sans Mono", "Andale Mono", "Liberation Mono",
#     "Courier New", Courier, monospace, Fixed, Consolas, Terminal
#     "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier,
#     "Liberation Mono", monospace, Fixed, Consolas, Terminal
#
# completion (Font):
#     Font used in the completion widget.

M zsh/.zshenv => zsh/.zshenv +4 -4
@@ 1,7 1,7 @@
typeset -U path
path=(~/bin ~/.cabal/bin $path[@])
browser="qutebrowser"
visual="nvim"
editor="nvim"
path=(~/bin ~/.local/bin $path[@])
browser=qutebrowser
visual=nvim
editor=nvim
fzf_default_command='ag -fg ""'
fzf_ctrl_t_command='ag -fg ""'

M zsh/.zshrc => zsh/.zshrc +3 -1
@@ 1,5 1,7 @@
. ~/.zshenv

export KEYTIMEOUT=1

ZSH=/usr/share/oh-my-zsh/
ZSH_THEME="jreese"
HYPHEN_INSENSITIVE="true"


@@ 16,7 18,7 @@ fi

source $ZSH/oh-my-zsh.sh

source $HOME/bin/base16-eighties.dark.sh
source $HOME/bin/base16-harmonic16.dark.sh

source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/doc/pkgfile/command-not-found.zsh