From b7f437d22e599551f694a75ea63c27a02794187d Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Mon, 20 Jul 2020 09:10:30 -0400 Subject: [PATCH 1/8] Add clojure, web dev, git undo, and resolved vimrc's --- vim/.vimrc | 18 ++++++++++++++++ vim/_vimrc | 61 ++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 56 insertions(+), 23 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index 003e214..feefe19 100755 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -45,7 +45,10 @@ 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' " cljfold " " Todo: @@ -107,6 +110,7 @@ set lazyredraw " Redraw only when necessary set updatetime=100 " Make updates happen faster (gitgutter) set splitright " Make split to right by default + set splitbelow set winheight=30 " Soft minimum window height (active) "set winminheight=10 " Hard minimum window height (inactive) set winwidth=85 " Window width for current window @@ -202,6 +206,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 {{{ " TODO: make only work in clojure files @@ -313,6 +330,7 @@ nmap ghs (GitGutterStageHunk) " Controls fugitive diff split direction set diffopt=vertical + command! Gundo !git reset --soft HEAD~1 "}}} " fold search {{{ diff --git a/vim/_vimrc b/vim/_vimrc index a55929e..43790d3 100644 --- a/vim/_vimrc +++ b/vim/_vimrc @@ -11,7 +11,6 @@ Plug 'junegunn/vim-easy-align' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin --all' } - Plug 'junegunn/fzf.vim' Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' Plug 'w0rp/ale' @@ -31,7 +30,7 @@ Plug 'sainnhe/vim-color-forest-night' Plug 'justinmk/vim-sneak' Plug 'axvr/zepl.vim' - Plug 'kovisoft/slimv' + " Plug 'kovisoft/slimv' Plug 'tpope/vim-vinegar' Plug 'preservim/nerdtree' Plug 'vimwiki/vimwiki' @@ -40,22 +39,19 @@ Plug 'junegunn/gv.vim' Plug 'rbong/vim-flog' Plug 'tpope/vim-unimpaired' + " 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' + " cljfold " 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() "}}} @@ -166,7 +162,7 @@ " Clear search highlighting with leader-space nnoremap :noh - + " Underline with line of the same length nnoremap - yypv$r- @@ -204,11 +200,31 @@ "}}} " slimv{{{ - let g:slimv_repl_split=2 - let g:slimv_repl_split_size=10 -" + " let g:slimv_repl_split=2 + " 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 e :Eval " eval form + nnoremap E :%Eval " eval file +" }}} + " split pane navigation {{{ " Map vertical split to \ w, switch to it, open explorer, prompt for filename " TODO: make new window prompt use fzf @@ -306,16 +322,15 @@ "}}} " git commands {{{ -" TODO: map fugitive commands -" TODO: check out gv etc -" TODO: bind hunk committing " Gitgutter hunk view nmap ghv (GitGutterPreviewHunk) nmap ghn (GitGutterNextHunk) nmap ghp (GitGutterPrevHunk) nmap ghf (GitGutterFold) + nmap ghs (GitGutterStageHunk) " Controls fugitive diff split direction set diffopt=vertical + command! Gundo !git reset --soft HEAD~1 "}}} " fold search {{{ From 69247fe8f6dbe792ad1c4361ebb53393e0405570 Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Mon, 20 Jul 2020 09:11:11 -0400 Subject: [PATCH 2/8] Resolve screen freezing on ctrl-s --- bash/.bashrc | 2 ++ zsh/.zshrc | 1 + 2 files changed, 3 insertions(+) diff --git a/bash/.bashrc b/bash/.bashrc index 09d3182..92dce65 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -12,3 +12,5 @@ export DISPLAY=:0 export LIBGL_ALWAYS_INDIRECT=1 export FZF_DEFAULT_COMMAD="find -L" export PATH="$PATH:/opt/mssql-tools/bin" + +stty -ixon # disable ctrl-s terminal freeze diff --git a/zsh/.zshrc b/zsh/.zshrc index 394163f..e38d56f 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -83,3 +83,4 @@ man() { command man "$@" } +stty -ixon # remove ctrl-s terminal freeze From c345dab400500cf17ec8709ae59d4d53daa743bb Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Mon, 20 Jul 2020 09:18:19 -0400 Subject: [PATCH 3/8] Netrw keepdir, other changes from work machine --- vim/_vimrc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/vim/_vimrc b/vim/_vimrc index 754cb15..e120619 100644 --- a/vim/_vimrc +++ b/vim/_vimrc @@ -33,13 +33,14 @@ Plug 'axvr/zepl.vim' Plug 'kovisoft/slimv' Plug 'tpope/vim-vinegar' - Plug 'preservim/nerdtree' + " Plug 'preservim/nerdtree' Plug 'vimwiki/vimwiki' Plug 'simnalamburt/vim-mundo' Plug 'tpope/vim-dadbod' Plug 'junegunn/gv.vim' Plug 'rbong/vim-flog' Plug 'tpope/vim-unimpaired' + Plug 'junegunn/goyo.vim' " Todo: " GV @@ -121,6 +122,7 @@ set t_vb= " No visual bell ever let g:sneak#use_ic_scs=1 set virtualedit=block + let g:netrw_keepdir=0 " cwd follows netrw location "}}} " searching {{{ @@ -218,6 +220,7 @@ nnoremap k nnoremap l nnoremap :close + " TODO remap to something else nnoremap :bn " Term mode tnoremap h @@ -382,14 +385,6 @@ command! -register CopyMatches call CopyMatches() " }}} -" vimrc {{{ - " source $MYVIMRC reloads the saved $MYVIMRC - :nmap s :source $MYVIMRC - - " opens $MYVIMRC for editing, or use :tabedit $MYVIMRC - :nmap v :e $MYVIMRC -"}}} - " gvim {{{ set guioptions=Ace set guifont=Consolas:h11 From ddcd11125ab7e48945f8203859c5c0a6fda7bb4f Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Mon, 27 Jul 2020 14:08:19 -0400 Subject: [PATCH 4/8] Add plugins for clojure/website, remove nerdtree Nerdtree apparently conflicts with vinegar? --- vim/_vimrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vim/_vimrc b/vim/_vimrc index e61fdc1..2e0ee33 100644 --- a/vim/_vimrc +++ b/vim/_vimrc @@ -32,13 +32,14 @@ Plug 'axvr/zepl.vim' " Plug 'kovisoft/slimv' Plug 'tpope/vim-vinegar' - Plug 'preservim/nerdtree' + " Plug 'preservim/nerdtree' Plug 'vimwiki/vimwiki' Plug 'simnalamburt/vim-mundo' Plug 'tpope/vim-dadbod' Plug 'junegunn/gv.vim' Plug 'rbong/vim-flog' Plug 'tpope/vim-unimpaired' + Plug 'junegunn/goyo.vim' " Clojure Plug 'guns/vim-clojure-static' " syntax Plug 'tpope/vim-fireplace' @@ -49,6 +50,9 @@ 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: From 04469d7f32ac442f0595a1df3da5d9f677072db5 Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Thu, 30 Jul 2020 13:31:09 -0400 Subject: [PATCH 5/8] Enable GPG ssh authentication --- bash/.bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bash/.bashrc b/bash/.bashrc index 92dce65..73e3572 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -14,3 +14,8 @@ export FZF_DEFAULT_COMMAD="find -L" 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 From 7cd0008e4c2bc527cd5bf38587523458daa8816a Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Mon, 17 Aug 2020 12:29:51 -0400 Subject: [PATCH 6/8] Same for zshrc --- zsh/.zshrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index e38d56f..453e4a9 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -84,3 +84,9 @@ 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 From 58ad6c20c363f188c8c6b69866f7bdea0ec8b66f Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Mon, 17 Aug 2020 12:53:50 -0400 Subject: [PATCH 7/8] Add sxhkdrc and bspwmrc --- bspwm/bspwmrc | 18 ++++++ bspwm/hold.txt | 0 sxhkd/sxhkdrc | 169 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+) create mode 100755 bspwm/bspwmrc delete mode 100644 bspwm/hold.txt create mode 100644 sxhkd/sxhkdrc diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc new file mode 100755 index 0000000..279c79d --- /dev/null +++ b/bspwm/bspwmrc @@ -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 diff --git a/bspwm/hold.txt b/bspwm/hold.txt deleted file mode 100644 index e69de29..0000000 diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc new file mode 100644 index 0000000..1dbe6a8 --- /dev/null +++ b/sxhkd/sxhkdrc @@ -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 From 186fdca812bc1cea63e33b1d0dee74cfc079a14d Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Sun, 14 Mar 2021 21:20:11 +0000 Subject: [PATCH 8/8] Default zenburn instead of wal --- vim/.vimrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index feefe19..0edad7a 100755 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,4 +1,3 @@ - " vim-plug {{{ " Automatic installation if empty(glob('~/.vim/autoload/plug.vim')) @@ -58,8 +57,8 @@ "}}} " appearance {{{ - " colorscheme zenburn - colorscheme wal + colorscheme zenburn + " colorscheme wal syntax on " Enable syntax set encoding=utf-8 " Keep utf-8 encoding set scrolloff=2 " Keep at least 3 lines above and below cursor