diff --git a/base/.Xresources b/base/.Xresources index 054d0000..e7a7f22b 100644 --- a/base/.Xresources +++ b/base/.Xresources @@ -69,22 +69,3 @@ URxvt.tabbed.tabbar-bg: 16 URxvt.tabbed.tab-fg: 15 URxvt.tabbed.tab-bg: 4 URxvt*buffered: false - -! UXTerm -UXTerm*termName: xterm-256color -UXTerm*cursorColor: white -UXTerm*VT100.geometry: 90x34 -UXTerm*font: monospace -UXTerm*faceSize: 11 -UXTerm*dynamicColors: true -UXTerm*utf8: 2 -UXTerm*eightBitInput: true -UXTerm*saveLines: 10000 -UXTerm*scrollKey: true -UXTerm*scrollTtyOutput: false -UXTerm*scrollBar: false -UXTerm*rightScrollBar: false -UXTerm*jumpScroll: true -UXTerm*multiScroll: true -UXTerm*toolBar: false - diff --git a/base/.vimrc b/base/.vimrc index ad1bdab5..faa7444e 100644 --- a/base/.vimrc +++ b/base/.vimrc @@ -5,36 +5,33 @@ scriptencoding utf8 " Arch defaults runtime! archlinux.vim +" create the backup and undo directories +silent! call mkdir($HOME.'/.config/nvim/undo', 'p') +silent! call mkdir($HOME.'/.config/nvim/backup', 'p') + " leader key let g:mapleader = "\" -" system clipboard (requires +clipboard) -set clipboard^=unnamed,unnamedplus - -" additional settings syntax enable -set number " enable line numbers -set backup " create backup files in runtimepath/backup/ -set undofile " persistent undo files in runtimepath/undo/ -set modeline " enable vim modelines -set hlsearch " highlight search items -set incsearch " searches are performed as you type -set confirm " ask confirmation like save before quit. -set tabstop=4 " tab is equivalent to how many spaces -set softtabstop=4 " tab is equivalent to how many spaces -set shiftwidth=4 " amount of spaces for indentation -set shortmess+=aAcws " hide or shorten certain messages -set wildmenu " tab completion menu when using command mode -set wildignore+=*~,*.pyc,*/.git/*,*.so,*.swp,*.o,*.zip,*.zwc,*.png,*.jpg -set ttimeout -set ttimeoutlen=10 -set timeoutlen=600 -set updatecount=80 +set clipboard^=unnamed,unnamedplus " system clipboard (requires +clipboard) +set number " enable line numbers +set backup " create backup files in runtimepath/backup/ +set undofile " persistent undo files in runtimepath/undo/ +set modeline " enable vim modelines +set hlsearch " highlight search items +set incsearch " searches are performed as you type +set confirm " ask confirmation like save before quit. +set tabstop=4 " tab is equivalent to how many spaces +set softtabstop=4 " tab is equivalent to how many spaces +set shiftwidth=4 " amount of spaces for indentation +set shortmess+=aAcws " hide or shorten certain messages +set wildmenu " tab completion menu in command mode set linebreak breakindent set list listchars=tab:>>,trail:~ +set wildignore+=*~,*.pyc,*/.git/*,*.so,*.swp,*.o,*.zip,*.zwc,*.png,*.jpg set mouse=niv " use the terminal mouse in command mode (:) -if has('mouse_sgr') - " sgr mouse is better but not every term supports it + +if has('mouse_sgr') " sgr mouse is better but not every term supports it set ttymouse=sgr endif @@ -44,13 +41,7 @@ let g:netrw_browse_split = 3 if $TERM !=? 'linux' set termguicolors - " true colors in terminals (neovim doesn't need this) - if !has('nvim') && !($TERM =~? 'xterm' || &term =~? 'xterm') - let $TERM = 'xterm-256color' - let &term = 'xterm-256color' - endif if has('multi_byte') && $TERM !=? 'linux' - " ▏│ ┆ ┃ › »» set list listchars=tab:▏\ ,extends:❯,precedes:❮ set fillchars=vert:┃ showbreak=↪ endif @@ -83,35 +74,10 @@ endif " ------ commands ------ command! D Explore -command! R call ranger() -command! -bang -complete=buffer -nargs=? Bclose call Bclose(, ) -command! -complete=buffer -nargs=? Bselect call Bselect() command! W exec 'silent w !sudo tee % >/dev/null'|edit! " ------ basic maps ------ -" visually select the whole file -vnoremap aa VGo1G - -" yank the entire file -nnoremap gyy gg"+yG'' -vnoremap gyy gg"+yG'' - -" open ranger as a file chooser using the function below -nnoremap r :call ranger() - -" select buffer from a list -nnoremap b :Bselect - -" close current buffer (and tab if needed) -nnoremap q :Bclose:silent tabclosegT - -" change windows with ctrl+(hjkl) -nnoremap -nnoremap -nnoremap -nnoremap - " alt defaults nnoremap 0 ^ nnoremap Y y$ @@ -120,38 +86,16 @@ nnoremap N Nzzzv nnoremap ==1j vnoremap == -" re-visual text after changing indent -vnoremap > >gv -vnoremap < nn :set number! - " gj/k but preserve numbered jumps ie: 12j or 45k nmap j v:count ? 'j' : 'gj' nmap k v:count ? 'k' : 'gk' -" open a terminal in $PWD -nnoremap tt :terminal - " toggle folding nnoremap za :set foldenable! -" tab control -nnoremap :tabmove -1 -nnoremap :tabmove +1 -nnoremap te :tabnew -nnoremap tn :tabnext -nnoremap tf :tabfirst -nnoremap tp :tabprevious - -" open a new tab in the current directory with netrw (file browser) -nnoremap - :tabedit =expand("%:p:h") - " fix syntax highlighting issues nnoremap U :syntax sync fromstart:redraw! - " ------ autocmd ------ " when quitting a file save the cursor position and reload if file changed @@ -187,184 +131,3 @@ else " otherwise disable cursorline set nocursorline endif - -" ------ adv maps ------ - - -" strip trailing whitespace, ss (strip space) -nnoremap ss - \ :let b:_p = getpos(".") - \ let b:_s = (@/ != '') ? @/ : '' - \ %s/\s\+$//e - \ let @/ = b:_s - \ nohlsearch - \ unlet b:_s - \ call setpos('.', b:_p) - \ unlet b:_p - -" global replace -vnoremap sw "hy - \ :let b:sub = input('global replacement: ') - \ if b:sub !=? '' - \ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') - \ execute '%s/'.b:rep."/".b:sub.'/g' - \ unlet b:sub b:rep - \ endif -nnoremap sw - \ :let b:sub = input('global replacement: ') - \ if b:sub !=? '' - \ execute "%s//".b:sub.'/g' - \ unlet b:sub - \ endif - -" prompt before each replace -vnoremap cw "hy - \ :let b:sub = input('interactive replacement: ') - \ if b:sub !=? '' - \ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') - \ execute '%s/'.b:rep.'/'.b:sub.'/gc' - \ unlet b:sub b:rep - \ endif - -nnoremap cw - \ :let b:sub = input('interactive replacement: ') - \ if b:sub !=? '' - \ execute "%s//".b:sub.'/gc' - \ unlet b:sub - \ endif - -" highlight long lines, ll (long lines) -let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth) -nnoremap ll - \ :if exists('w:longlines') - \ silent! call matchdelete(w:longlines) - \ echo 'Long line highlighting disabled' - \ unlet w:longlines - \ elseif &textwidth > 0 - \ let w:longlines = matchadd('ColorColumn', '\%'.&textwidth.'v', &textwidth) - \ echo 'Long line highlighting enabled' - \ else - \ let w:longlines = matchadd('ColorColumn', '\%80v', 81) - \ echo 'Long line highlighting enabled' - \ endif - -" local keyword jump -nnoremap fw - \ [I:let b:jump = input('Go To: ') - \ if b:jump !=? '' - \ execute "normal! ".b:jump."[\t" - \ unlet b:jump - \ endif - - -function! Bclose(bang, buffer) abort - if empty(a:buffer) - let l:target = bufnr('%') - elseif a:buffer =~? '^\d\+$' - let l:target = bufnr(str2nr(a:buffer)) - else - let l:target = bufnr(a:buffer) - endif - - if l:target < 0 - call WarningMsg('No matching buffer for '.a:buffer) - return - endif - - if empty(a:bang) && getbufvar(l:target, '&modified') - call WarningMsg('No write since last change for buffer '.l:target.' (use :Bclose!)') - return - endif - - " Numbers of windows that view target buffer which we will delete. - let l:num_wins = filter(range(1, winnr('$')), 'winbufnr(v:val) == l:target') - - if empty(a:bang) && len(l:num_wins) > 1 - call WarningMsg('Buffer is open in multiple windows (use :Bclose!)') - return - endif - - let l:cur_win = winnr() - - for w in l:num_wins - execute w.'wincmd w' - let prevbuf = bufnr('#') - if prevbuf > 0 && buflisted(prevbuf) && prevbuf != w - buffer # - else - bprevious - endif - if l:target == bufnr('%') - " Numbers of listed buffers which are not the target to be deleted. - let blisted = filter(range(1, bufnr('$')), 'buflisted(v:val) && v:val != l:target') - " Listed, not target, and not displayed. - let bhidden = filter(copy(blisted), 'bufwinnr(v:val) < 0') - " Take the first buffer, if any (could be more intelligent). - let bjump = (bhidden + blisted + [-1])[0] - if bjump > 0 - execute 'buffer '.bjump - else - execute 'enew'.a:bang - endif - endif - endfor - - execute 'bdelete'.a:bang.' '.l:target - execute l:cur_win.'wincmd w' -endfunction - -function! Bselect(...) abort - let l:pattern = a:0 >= 1 ? a:1 : '' - if l:pattern ==? '' - let l:pattern = input('String match: ') - redraw! - endif - if l:pattern !=# '' - let l:bufcount = bufnr('$') - let l:currbufnr = 1 - let l:nummatches = 0 - let l:matchingbufnr = 0 - - while l:currbufnr <= l:bufcount - if bufexists(l:currbufnr) - let l:currbufname = bufname(l:currbufnr) - if (match(l:currbufname, l:pattern) > -1) - echo l:currbufnr . ': ' . l:currbufname - let l:nummatches += 1 - let l:matchingbufnr = l:currbufnr - endif - endif - let l:currbufnr += 1 - endwhile - - if (l:nummatches == 1) - execute ':buffer '.l:matchingbufnr - elseif (l:nummatches > 1) - let l:desiredbufnr = input('Enter buffer number: ') - if (strlen(l:desiredbufnr) != 0) - execute ':buffer ' . l:desiredbufnr - endif - else - call WarningMsg('No matching buffers') - endif - endif -endfunction - -function! ranger() - let l:temp = tempname() - execute 'silent !xterm -e ranger --choosefiles='.shellescape(l:temp).' $PWD' - if !filereadable(temp) - redraw! - return - endif - let l:names = readfile(l:temp) - if empty(l:names) - redraw! - return - endif - execute 'edit '.fnameescape(l:names[0]) - for l:name in l:names[1:] - execute 'argadd '.fnameescape(l:name) - endfor - redraw! -endfunction diff --git a/openbox-home/.config/skippy-xd/skippy-xd.rc b/openbox-home/.config/skippy-xd/skippy-xd.rc deleted file mode 100644 index adc98ed4..00000000 --- a/openbox-home/.config/skippy-xd/skippy-xd.rc +++ /dev/null @@ -1,53 +0,0 @@ -[general] -distance = 30 -useNetWMFullscreen = true -ignoreSkipTaskbar = true -updateFreq = 10.0 -lazyTrans = false -pipePath = /tmp/skippy-xd-fifo -movePointerOnStart = true -movePointerOnSelect = true -movePointerOnRaise = true -switchDesktopOnActivate = true -useNameWindowPixmap = false -forceNameWindowPixmap = false -includeFrame = true -allowUpscale = true -showAllDesktops = true -showUnmapped = true -preferredIconSize = 32 -clientDisplayModes = thumbnail icon filled none -iconFillSpec = orig mid mid #383838 -fillSpec = orig mid mid #EFF0F1 -background = - -[xinerama] -showAll = true - -[normal] -tint = #000000 -tintOpacity = 60 -opacity = 250 - -[highlight] -tint = #000000 -tintOpacity = 0 -opacity = 250 - -[tooltip] -show = true -followsMouse = true -offsetX = 20 -offsetY = 20 -align = left -border = #EFF0F1 -background = #212121 -opacity = 240 -text = #EFF0F1 -textShadow = none -font = Ubuntu 10 - -[bindings] -miwMouse1 = focus -miwMouse2 = close-ewmh -miwMouse3 = iconify diff --git a/xfce4-home/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml b/xfce4-home/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml index ce738e8c..2497c776 100644 --- a/xfce4-home/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml +++ b/xfce4-home/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml @@ -17,6 +17,6 @@ - +