Merge branch 'master' of https://gitlab.com/keanegit/dotfiles
This commit is contained in:
commit
acd1b988eb
7 changed files with 266 additions and 35 deletions
|
|
@ -12,3 +12,10 @@ export DISPLAY=:0
|
||||||
export LIBGL_ALWAYS_INDIRECT=1
|
export LIBGL_ALWAYS_INDIRECT=1
|
||||||
export FZF_DEFAULT_COMMAD="find -L"
|
export FZF_DEFAULT_COMMAD="find -L"
|
||||||
export PATH="$PATH:/opt/mssql-tools/bin"
|
export PATH="$PATH:/opt/mssql-tools/bin"
|
||||||
|
|
||||||
|
stty -ixon # disable ctrl-s terminal freeze
|
||||||
|
|
||||||
|
# Enable GPG ssh auth
|
||||||
|
|
||||||
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
|
|
||||||
18
bspwm/bspwmrc
Executable file
18
bspwm/bspwmrc
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
sxhkd &
|
||||||
|
|
||||||
|
bspc monitor -d I II III IV V VI VII VIII IX X
|
||||||
|
|
||||||
|
bspc config border_width 2
|
||||||
|
bspc config window_gap 12
|
||||||
|
|
||||||
|
bspc config split_ratio 0.52
|
||||||
|
bspc config borderless_monocle true
|
||||||
|
bspc config gapless_monocle true
|
||||||
|
|
||||||
|
bspc rule -a Gimp desktop='^8' state=floating follow=on
|
||||||
|
bspc rule -a Chromium desktop='^2'
|
||||||
|
bspc rule -a mplayer2 state=floating
|
||||||
|
bspc rule -a Kupfer.py focus=on
|
||||||
|
bspc rule -a Screenkey manage=off
|
||||||
169
sxhkd/sxhkdrc
Normal file
169
sxhkd/sxhkdrc
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
#
|
||||||
|
# wm independent hotkeys
|
||||||
|
#
|
||||||
|
|
||||||
|
# terminal emulator
|
||||||
|
super + Return
|
||||||
|
urxvt
|
||||||
|
|
||||||
|
# program launcher
|
||||||
|
super + @space
|
||||||
|
dmenu_run -l 15 -i -nf $(xrdb -query | grep '^*foreground' | cut -f2) -nb $(xrdb -query | grep '^*background' | cut -f2) -sb $(xrdb -query | grep -m 1 '*color1' | cut -f2) -sf $(xrdb -query | grep '^*foreground' | cut -f2)
|
||||||
|
|
||||||
|
# make sxhkd reload its configuration files:
|
||||||
|
super + Escape
|
||||||
|
pkill -USR1 -x sxhkd
|
||||||
|
|
||||||
|
#
|
||||||
|
# bspwm hotkeys
|
||||||
|
#
|
||||||
|
|
||||||
|
# quit/restart bspwm
|
||||||
|
super + alt + {q,r}
|
||||||
|
bspc {quit,wm -r}
|
||||||
|
|
||||||
|
# close and kill
|
||||||
|
#super + {_,shift + }w
|
||||||
|
super + q
|
||||||
|
bspc node -{c,k}
|
||||||
|
|
||||||
|
# alternate between the tiled and monocle layout
|
||||||
|
# super + m
|
||||||
|
# bspc desktop -l next
|
||||||
|
|
||||||
|
# send the newest marked node to the newest preselected node
|
||||||
|
super + y
|
||||||
|
bspc node newest.marked.local -n newest.!automatic.local
|
||||||
|
|
||||||
|
# swap the current node and the biggest node
|
||||||
|
super + g
|
||||||
|
bspc node -s biggest
|
||||||
|
|
||||||
|
#
|
||||||
|
# state/flags
|
||||||
|
#
|
||||||
|
|
||||||
|
# set the window state
|
||||||
|
super + {t,shift + t,s,f}
|
||||||
|
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
|
||||||
|
|
||||||
|
# set the node flags
|
||||||
|
super + ctrl + {m,x,y,z}
|
||||||
|
bspc node -g {marked,locked,sticky,private}
|
||||||
|
|
||||||
|
#
|
||||||
|
# focus/swap
|
||||||
|
#
|
||||||
|
|
||||||
|
# focus the node in the given direction
|
||||||
|
super + {_,shift + }{h,j,k,l}
|
||||||
|
bspc node -{f,s} {west,south,north,east}
|
||||||
|
|
||||||
|
# focus the node for the given path jump
|
||||||
|
#super + {p,b,comma,period}
|
||||||
|
# bspc node -f @{parent,brother,first,second}
|
||||||
|
|
||||||
|
# focus the next/previous node in the current desktop
|
||||||
|
#super + {_,shift + }c
|
||||||
|
# bspc node -f {next,prev}.local
|
||||||
|
|
||||||
|
# focus the next/previous desktop in the current monitor
|
||||||
|
super + bracket{left,right}
|
||||||
|
bspc desktop -f {prev,next}.local
|
||||||
|
|
||||||
|
# focus the last node/desktop
|
||||||
|
super + {grave,Tab}
|
||||||
|
bspc {node,desktop} -f last
|
||||||
|
|
||||||
|
# focus the older or newer node in the focus history
|
||||||
|
super + {o,i}
|
||||||
|
bspc wm -h off; \
|
||||||
|
bspc node {older,newer} -f; \
|
||||||
|
bspc wm -h on
|
||||||
|
|
||||||
|
# focus or send to the given desktop
|
||||||
|
super + {_,shift + }{1-9,0}
|
||||||
|
bspc {desktop -f,node -d} '^{1-9,10}'
|
||||||
|
|
||||||
|
#
|
||||||
|
# preselect
|
||||||
|
#
|
||||||
|
|
||||||
|
# preselect the direction
|
||||||
|
super + ctrl + {h,j,k,l}
|
||||||
|
bspc node -p {west,south,north,east}
|
||||||
|
|
||||||
|
# preselect the ratio
|
||||||
|
super + ctrl + {1-9}
|
||||||
|
bspc node -o 0.{1-9}
|
||||||
|
|
||||||
|
# cancel the preselection for the focused node
|
||||||
|
super + ctrl + space
|
||||||
|
bspc node -p cancel
|
||||||
|
|
||||||
|
# cancel the preselection for the focused desktop
|
||||||
|
super + ctrl + shift + space
|
||||||
|
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
|
||||||
|
|
||||||
|
#
|
||||||
|
# move/resize
|
||||||
|
#
|
||||||
|
|
||||||
|
# expand a window by moving one of its side outward
|
||||||
|
super + alt + {h,j,k,l}
|
||||||
|
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
||||||
|
|
||||||
|
# contract a window by moving one of its side inward
|
||||||
|
super + alt + shift + {h,j,k,l}
|
||||||
|
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
||||||
|
|
||||||
|
# move a floating window
|
||||||
|
super + {Left,Down,Up,Right}
|
||||||
|
bspc node -v {-20 0,0 20,0 -20,20 0}
|
||||||
|
|
||||||
|
# super + d
|
||||||
|
# dmenu_run -l 15 -i
|
||||||
|
|
||||||
|
super + d
|
||||||
|
dmenu_run -l 15 -i -nf $(xrdb -query | grep '^*foreground' | cut -f2) -nb $(xrdb -query | grep '^*background' | cut -f2) -sb $(xrdb -query | grep -m 1 '*color1' | cut -f2) -sf $(xrdb -query | grep '^*foreground' | cut -f2)
|
||||||
|
|
||||||
|
super + w
|
||||||
|
bspc config window_gap 0 && bspc config border_width 1
|
||||||
|
|
||||||
|
super + shift + w
|
||||||
|
bspc config window_gap 12 && bspc config border_width 2
|
||||||
|
|
||||||
|
super + m
|
||||||
|
{bspc rule -a \* -o state=floating && urxvt -e ncmpcpp}
|
||||||
|
# urxvt -e bspc node -t ~floating && ncmpcpp
|
||||||
|
|
||||||
|
super + p
|
||||||
|
urxvt -e vim $(tree -iaf -I .cache | dmenu)
|
||||||
|
|
||||||
|
super + n
|
||||||
|
{bspc rule -a \* -o state=floating && urxvt -e newsboat}
|
||||||
|
|
||||||
|
super + shift + n
|
||||||
|
{bspc rule -a \* -o state=floating && urxvt -e nmtui}
|
||||||
|
|
||||||
|
super + c
|
||||||
|
{bspc rule -a \* -o state=floating && urxvt -e calcurse -D ~/.config/calcurse }
|
||||||
|
|
||||||
|
# Increase/descrease gap size
|
||||||
|
super + z
|
||||||
|
bspc config window_gap $(($(bspc config window_gap) - 3))
|
||||||
|
|
||||||
|
super + shift + z
|
||||||
|
bspc config window_gap $(($(bspc config window_gap) + 3))
|
||||||
|
|
||||||
|
super + r
|
||||||
|
{bspc rule -a \* -o state=floating && urxvt -e ranger}
|
||||||
|
|
||||||
|
super + b
|
||||||
|
exec qutebrowser
|
||||||
|
|
||||||
|
super + x
|
||||||
|
setxkbmap -layout us
|
||||||
|
|
||||||
|
super + shift + x
|
||||||
|
setxkbmap -layout ru
|
||||||
23
vim/.vimrc
23
vim/.vimrc
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
" vim-plug {{{
|
" vim-plug {{{
|
||||||
" Automatic installation
|
" Automatic installation
|
||||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||||
|
|
@ -45,7 +44,10 @@
|
||||||
Plug 'guns/vim-sexp'
|
Plug 'guns/vim-sexp'
|
||||||
Plug 'tpope/vim-sexp-mappings-for-regular-people'
|
Plug 'tpope/vim-sexp-mappings-for-regular-people'
|
||||||
Plug 'dylanaraps/wal.vim'
|
Plug 'dylanaraps/wal.vim'
|
||||||
|
Plug 'alvan/vim-closetag'
|
||||||
|
Plug 'mattn/emmet-vim'
|
||||||
" Plug 'tpope/vim-salve'
|
" Plug 'tpope/vim-salve'
|
||||||
|
Plug 'chrisbra/colorizer'
|
||||||
" cljfold
|
" cljfold
|
||||||
|
|
||||||
" " Todo:
|
" " Todo:
|
||||||
|
|
@ -55,8 +57,8 @@
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" appearance {{{
|
" appearance {{{
|
||||||
" colorscheme zenburn
|
colorscheme zenburn
|
||||||
colorscheme wal
|
" colorscheme wal
|
||||||
syntax on " Enable syntax
|
syntax on " Enable syntax
|
||||||
set encoding=utf-8 " Keep utf-8 encoding
|
set encoding=utf-8 " Keep utf-8 encoding
|
||||||
set scrolloff=2 " Keep at least 3 lines above and below cursor
|
set scrolloff=2 " Keep at least 3 lines above and below cursor
|
||||||
|
|
@ -107,6 +109,7 @@
|
||||||
set lazyredraw " Redraw only when necessary
|
set lazyredraw " Redraw only when necessary
|
||||||
set updatetime=100 " Make updates happen faster (gitgutter)
|
set updatetime=100 " Make updates happen faster (gitgutter)
|
||||||
set splitright " Make split to right by default
|
set splitright " Make split to right by default
|
||||||
|
set splitbelow
|
||||||
set winheight=30 " Soft minimum window height (active)
|
set winheight=30 " Soft minimum window height (active)
|
||||||
"set winminheight=10 " Hard minimum window height (inactive)
|
"set winminheight=10 " Hard minimum window height (inactive)
|
||||||
set winwidth=85 " Window width for current window
|
set winwidth=85 " Window width for current window
|
||||||
|
|
@ -202,6 +205,19 @@
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
" {{{ web dev
|
||||||
|
autocmd FileType html set softtabstop=2
|
||||||
|
autocmd FileType html set ts=2
|
||||||
|
autocmd FileType html set shiftwidth=2
|
||||||
|
autocmd FileType css set softtabstop=2
|
||||||
|
autocmd FileType css set ts=2
|
||||||
|
autocmd FileType html set shiftwidth=2
|
||||||
|
|
||||||
|
" Emmet tab size
|
||||||
|
let g:user_emmet_settings = {
|
||||||
|
\ 'indentation' : ' '
|
||||||
|
\}
|
||||||
|
" }}}
|
||||||
|
|
||||||
" clojure {{{
|
" clojure {{{
|
||||||
" TODO: make only work in clojure files
|
" TODO: make only work in clojure files
|
||||||
|
|
@ -313,6 +329,7 @@
|
||||||
nmap ghs <Plug>(GitGutterStageHunk)
|
nmap ghs <Plug>(GitGutterStageHunk)
|
||||||
" Controls fugitive diff split direction
|
" Controls fugitive diff split direction
|
||||||
set diffopt=vertical
|
set diffopt=vertical
|
||||||
|
command! Gundo !git reset --soft HEAD~1
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" fold search {{{
|
" fold search {{{
|
||||||
|
|
|
||||||
77
vim/_vimrc
77
vim/_vimrc
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
Plug 'junegunn/vim-easy-align'
|
Plug 'junegunn/vim-easy-align'
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin --all' }
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin --all' }
|
||||||
Plug 'junegunn/fzf.vim'
|
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'tpope/vim-commentary'
|
Plug 'tpope/vim-commentary'
|
||||||
Plug 'w0rp/ale'
|
Plug 'w0rp/ale'
|
||||||
|
|
@ -31,31 +30,32 @@
|
||||||
Plug 'sainnhe/vim-color-forest-night'
|
Plug 'sainnhe/vim-color-forest-night'
|
||||||
Plug 'justinmk/vim-sneak'
|
Plug 'justinmk/vim-sneak'
|
||||||
Plug 'axvr/zepl.vim'
|
Plug 'axvr/zepl.vim'
|
||||||
Plug 'kovisoft/slimv'
|
" Plug 'kovisoft/slimv'
|
||||||
Plug 'tpope/vim-vinegar'
|
Plug 'tpope/vim-vinegar'
|
||||||
Plug 'preservim/nerdtree'
|
" Plug 'preservim/nerdtree'
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
Plug 'simnalamburt/vim-mundo'
|
Plug 'simnalamburt/vim-mundo'
|
||||||
Plug 'tpope/vim-dadbod'
|
Plug 'tpope/vim-dadbod'
|
||||||
Plug 'junegunn/gv.vim'
|
Plug 'junegunn/gv.vim'
|
||||||
Plug 'rbong/vim-flog'
|
Plug 'rbong/vim-flog'
|
||||||
Plug 'tpope/vim-unimpaired'
|
Plug 'tpope/vim-unimpaired'
|
||||||
|
Plug 'junegunn/goyo.vim'
|
||||||
|
" Clojure
|
||||||
|
Plug 'guns/vim-clojure-static' " syntax
|
||||||
|
Plug 'tpope/vim-fireplace'
|
||||||
|
Plug 'guns/vim-sexp'
|
||||||
|
Plug 'tpope/vim-sexp-mappings-for-regular-people'
|
||||||
|
Plug 'dylanaraps/wal.vim'
|
||||||
|
Plug 'alvan/vim-closetag'
|
||||||
|
Plug 'mattn/emmet-vim'
|
||||||
|
" Plug 'tpope/vim-salve'
|
||||||
|
Plug 'chrisbra/colorizer'
|
||||||
|
" Plug 'ycm-core/YouCompleteMe'
|
||||||
|
Plug 'vim-pandoc/vim-pandoc'
|
||||||
|
Plug 'vim-pandoc/vim-pandoc-syntax'
|
||||||
|
" cljfold
|
||||||
|
|
||||||
" Todo:
|
" Todo:
|
||||||
" GV
|
|
||||||
" Gundo (or undotree?)
|
|
||||||
" Emmett
|
|
||||||
" Fugitive
|
|
||||||
" Vimwiki
|
|
||||||
" Plug 'ryanss/vim-hackernews'
|
|
||||||
" Plug 'mbbill/undotree' or Plug 'sjl/gundo.vim'
|
|
||||||
" Plug 'tpope/vim-projectionist'
|
|
||||||
" Plug 'mileszs/ack.vim'
|
|
||||||
" Plug 'vim-pandoc/vim-pandoc'
|
|
||||||
" Plug 'alfredodeza/pytest.vim'
|
|
||||||
" Plug 'docker/docker'
|
|
||||||
" Plug vim-scripts/indentpython.vim
|
|
||||||
"
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
@ -121,6 +121,7 @@
|
||||||
set t_vb= " No visual bell ever
|
set t_vb= " No visual bell ever
|
||||||
let g:sneak#use_ic_scs=1
|
let g:sneak#use_ic_scs=1
|
||||||
set virtualedit=block
|
set virtualedit=block
|
||||||
|
let g:netrw_keepdir=0 " cwd follows netrw location
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" searching {{{
|
" searching {{{
|
||||||
|
|
@ -166,7 +167,7 @@
|
||||||
|
|
||||||
" Clear search highlighting with leader-space
|
" Clear search highlighting with leader-space
|
||||||
nnoremap <leader><space> :noh<cr>
|
nnoremap <leader><space> :noh<cr>
|
||||||
|
|
||||||
" Underline with line of the same length
|
" Underline with line of the same length
|
||||||
nnoremap <leader>- yypv$r-
|
nnoremap <leader>- yypv$r-
|
||||||
|
|
||||||
|
|
@ -204,11 +205,31 @@
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" slimv{{{
|
" slimv{{{
|
||||||
let g:slimv_repl_split=2
|
" let g:slimv_repl_split=2
|
||||||
let g:slimv_repl_split_size=10
|
" let g:slimv_repl_split_size=10
|
||||||
"
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
" {{{ web dev
|
||||||
|
autocmd FileType html set softtabstop=2
|
||||||
|
autocmd FileType html set ts=2
|
||||||
|
autocmd FileType html set shiftwidth=2
|
||||||
|
autocmd FileType css set softtabstop=2
|
||||||
|
autocmd FileType css set ts=2
|
||||||
|
autocmd FileType html set shiftwidth=2
|
||||||
|
|
||||||
|
" Emmet tab size
|
||||||
|
let g:user_emmet_settings = {
|
||||||
|
\ 'indentation' : ' '
|
||||||
|
\}
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
" clojure {{{
|
||||||
|
" TODO: make only work in clojure files
|
||||||
|
nnoremap <leader>e :Eval<CR> " eval form
|
||||||
|
nnoremap <leader>E :%Eval<CR> " eval file
|
||||||
|
" }}}
|
||||||
|
|
||||||
" split pane navigation {{{
|
" split pane navigation {{{
|
||||||
" Map vertical split to \ w, switch to it, open explorer, prompt for filename
|
" Map vertical split to \ w, switch to it, open explorer, prompt for filename
|
||||||
" TODO: make new window prompt use fzf
|
" TODO: make new window prompt use fzf
|
||||||
|
|
@ -219,6 +240,7 @@
|
||||||
nnoremap <C-k> <C-w>k
|
nnoremap <C-k> <C-w>k
|
||||||
nnoremap <C-l> <C-w>l
|
nnoremap <C-l> <C-w>l
|
||||||
nnoremap <C-c> :close <cr>
|
nnoremap <C-c> :close <cr>
|
||||||
|
" TODO remap to something else
|
||||||
nnoremap <C-n> :bn <cr>
|
nnoremap <C-n> :bn <cr>
|
||||||
" Term mode
|
" Term mode
|
||||||
tnoremap <C-h> <C-w>h
|
tnoremap <C-h> <C-w>h
|
||||||
|
|
@ -306,16 +328,15 @@
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" git commands {{{
|
" git commands {{{
|
||||||
" TODO: map fugitive commands
|
|
||||||
" TODO: check out gv etc
|
|
||||||
" TODO: bind hunk committing
|
|
||||||
" Gitgutter hunk view
|
" Gitgutter hunk view
|
||||||
nmap ghv <Plug>(GitGutterPreviewHunk)
|
nmap ghv <Plug>(GitGutterPreviewHunk)
|
||||||
nmap ghn <Plug>(GitGutterNextHunk)
|
nmap ghn <Plug>(GitGutterNextHunk)
|
||||||
nmap ghp <Plug>(GitGutterPrevHunk)
|
nmap ghp <Plug>(GitGutterPrevHunk)
|
||||||
nmap ghf <Plug>(GitGutterFold)
|
nmap ghf <Plug>(GitGutterFold)
|
||||||
|
nmap ghs <Plug>(GitGutterStageHunk)
|
||||||
" Controls fugitive diff split direction
|
" Controls fugitive diff split direction
|
||||||
set diffopt=vertical
|
set diffopt=vertical
|
||||||
|
command! Gundo !git reset --soft HEAD~1
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" fold search {{{
|
" fold search {{{
|
||||||
|
|
@ -384,14 +405,6 @@ command! -register CopyMatches call CopyMatches(<q-reg>)
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" vimrc {{{
|
|
||||||
" source $MYVIMRC reloads the saved $MYVIMRC
|
|
||||||
:nmap <Leader>s :source $MYVIMRC
|
|
||||||
|
|
||||||
" opens $MYVIMRC for editing, or use :tabedit $MYVIMRC
|
|
||||||
:nmap <Leader>v :e $MYVIMRC
|
|
||||||
"}}}
|
|
||||||
|
|
||||||
" gvim {{{
|
" gvim {{{
|
||||||
set guioptions=Ace
|
set guioptions=Ace
|
||||||
set guifont=Consolas:h11
|
set guifont=Consolas:h11
|
||||||
|
|
|
||||||
|
|
@ -83,3 +83,10 @@ man() {
|
||||||
command man "$@"
|
command man "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stty -ixon # remove ctrl-s terminal freeze
|
||||||
|
|
||||||
|
|
||||||
|
# Enable GPG ssh auth
|
||||||
|
|
||||||
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue