From e1876457ec9d162a66664762d8d900d5feae866d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Tue, 25 Jul 2017 19:14:34 -0500 Subject: [PATCH] Ultrawide changes? --- apps/neovim/init.vim | 47 ++++++++++++++++++++++++++++++++++++++++++++ de/bspwm_config | 2 +- de/bspwmrc | 5 ++++- de/sxhkdrc | 2 +- de/xprofile | 4 ---- 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/apps/neovim/init.vim b/apps/neovim/init.vim index c02df1f..87389fe 100644 --- a/apps/neovim/init.vim +++ b/apps/neovim/init.vim @@ -503,6 +503,53 @@ endif " enter insert mode when entering a terminal buffer autocmd BufWinEnter,WinEnter term://* startinsert +" Jump to the next or previous line that has the same level or a lower +" level of indentation than the current line. +" +" exclusive (bool): true: Motion is exclusive +" false: Motion is inclusive +" fwd (bool): true: Go to next line +" false: Go to previous line +" lowerlevel (bool): true: Go to line with lower indentation level +" false: Go to line with the same indentation level +" skipblanks (bool): true: Skip blank lines +" false: Don't skip blank lines +function! NextIndent(exclusive, fwd, lowerlevel, skipblanks) + let line = line('.') + let column = col('.') + let lastline = line('$') + let indent = indent(line) + let stepvalue = a:fwd ? 1 : -1 + while (line > 0 && line <= lastline) + let line = line + stepvalue + if ( ! a:lowerlevel && indent(line) == indent || + \ a:lowerlevel && indent(line) < indent) + if (! a:skipblanks || strlen(getline(line)) > 0) + if (a:exclusive) + let line = line - stepvalue + endif + exe line + exe "normal " column . "|" + return + endif + endif + endwhile +endfunction + +" Moving back and forth between lines of same or lower indentation. +nnoremap [l :call NextIndent(0, 0, 0, 1) +nnoremap ]l :call NextIndent(0, 1, 0, 1) +nnoremap [L :call NextIndent(0, 0, 1, 1) +nnoremap ]L :call NextIndent(0, 1, 1, 1) +vnoremap [l :call NextIndent(0, 0, 0, 1)m'gv'' +vnoremap ]l :call NextIndent(0, 1, 0, 1)m'gv'' +vnoremap [L :call NextIndent(0, 0, 1, 1)m'gv'' +vnoremap ]L :call NextIndent(0, 1, 1, 1)m'gv'' +onoremap [l :call NextIndent(0, 0, 0, 1) +onoremap ]l :call NextIndent(0, 1, 0, 1) +onoremap [L :call NextIndent(1, 0, 1, 1) +onoremap ]L :call NextIndent(1, 1, 1, 1) + " run make with leader,m nnoremap m :call RunMake() diff --git a/de/bspwm_config b/de/bspwm_config index 8b2b875..904633f 100755 --- a/de/bspwm_config +++ b/de/bspwm_config @@ -19,7 +19,7 @@ bspc config focused_border_color "$(xrdb -query | sed -ne 's/.*color0\?4:\s*//p bspc config active_border_color "$(xrdb -query | sed -ne 's/.*color0\?4:\s*//p')" bspc config presel_feedback_color "$(xrdb -query | sed -ne 's/.*color0\?4:\s*//p')" bspc config border_width "$BORDER_WIDTH" -bspc config split_ratio 0.50 +bspc config split_ratio 0.666666 bspc config borderless_monocle true bspc config gapless_monocle true diff --git a/de/bspwmrc b/de/bspwmrc index 8290ae5..e49752b 100755 --- a/de/bspwmrc +++ b/de/bspwmrc @@ -1,5 +1,6 @@ #!/usr/bin/env bash +# NO_COMPTON=1 BORDER_WIDTH=5 # change in bspwm_config, here for launcher START_BAR=1 BAR_COMMAND="$DOTFILES_PATH/de/bar/bar.bash" @@ -43,7 +44,9 @@ if command -v unclutter >/dev/null 2>&1; then fi if command -v compton >/dev/null 2>&1; then - compton & + if [[ -z $NO_COMPTON ]]; then + compton & + fi fi # launch bar diff --git a/de/sxhkdrc b/de/sxhkdrc index 8051256..3bc5c11 100755 --- a/de/sxhkdrc +++ b/de/sxhkdrc @@ -54,7 +54,7 @@ super + alt + shift + {h,j,k,l} # set node split ratio super + ctrl + {1-9,0} - bspc node -r 0.{1-9,10} + bspc node --ratio 0.{1-9,10} # move a floating window very slowly super + shift + {Left,Down,Up,Right} diff --git a/de/xprofile b/de/xprofile index 6b0822f..35ae894 100644 --- a/de/xprofile +++ b/de/xprofile @@ -32,10 +32,6 @@ if command -v redshift >/dev/null 2>&1; then redshift & fi -if [ -d "/usr/lib/nvidia" ]; then - export LD_LIBRARY_PATH=/usr/lib/nvidia -fi - if [ -f "$HOME/.env_xprofile" ]; then source "$HOME/.env_xprofile" fi