limpieza. vimwiki. zsh. mail
This commit is contained in:
parent
434ea3e0bd
commit
8f7b042c24
|
@ -1,5 +1,7 @@
|
|||
// this goes in /usr/lib/firefox
|
||||
var {classes:Cc,interfaces:Ci,utils:Cu} = Components;
|
||||
var newTabURL = "file:///home/deadguy/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html";
|
||||
aboutNewTabService = Cc["@mozilla.org/browser/aboutnewtab-service;1"].getService(Ci.nsIAboutNewTabService);
|
||||
aboutNewTabService.newTabURL = newTabURL;
|
||||
try {
|
||||
Cu.import("resource:///modules/AboutNewTab.jsm");
|
||||
var newTabURL = "file:///home/deadguy/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html";
|
||||
AboutNewTab.newTabURL = newTabURL;
|
||||
} catch(e){Cu.reportError(e);} // report errors in the Browser Console
|
||||
|
|
|
@ -162,7 +162,7 @@ cmd paste-interactive %{{
|
|||
}}
|
||||
|
||||
cmd fzf_jump ${{
|
||||
res="$(find . -maxdepth 3 | fzf-tmux --reverse --header='Jump to location')"
|
||||
res="$(find . -maxdepth 3 -printf '%P\n' | fzf --reverse --header='Jump to location')"
|
||||
if [ -f "$res" ]; then
|
||||
cmd="select"
|
||||
elif [ -d "$res" ]; then
|
||||
|
@ -172,18 +172,6 @@ cmd fzf_jump ${{
|
|||
lf -remote "send $id $cmd \"$res\""
|
||||
}}
|
||||
|
||||
cmd broot_jump ${{
|
||||
f=$(mktemp)
|
||||
res="$(broot --outcmd $f && cat $f | sed 's/cd //')"
|
||||
rm -f "$f"
|
||||
if [ -f "$res" ]; then
|
||||
cmd="select"
|
||||
elif [ -d "$res" ]; then
|
||||
cmd="cd"
|
||||
fi
|
||||
lf -remote "send $id $cmd \"$res\""
|
||||
}}
|
||||
|
||||
cmd Link %{{
|
||||
lf -remote 'load' | while read file; do
|
||||
if [ ! -n "${mode+1}" ]; then
|
||||
|
@ -289,7 +277,7 @@ map a push A<a-b> # after extension
|
|||
map B bulkrename
|
||||
|
||||
map L :Link
|
||||
map f broot_jump
|
||||
map f fzf_jump
|
||||
map <tab> $lf -remote "send $id select '$(fzf)'"
|
||||
map / $lf -remote "send $id select \"$(FZF_DEFAULT_COMMAND='fd --max-depth=1' fzf)\""
|
||||
map F $find | lf -remote "send $id select $(fzf --height 50% --reverse --border --margin 5% --inline-info --color border:#005688,bg+:#16252E,fg+:#26c6da,hl+:#ffffff,hl:#26c6da)"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
autocmd BufRead,BufNewFile *.wiki setfiletype vimwiki
|
|
@ -5,8 +5,57 @@ setlocal tabstop=2 expandtab softtabstop=2 linebreak
|
|||
setlocal autoindent noruler colorcolumn=80
|
||||
setlocal spell spelllang=es,en_us
|
||||
|
||||
function! s:OnExit(job_id, code, event) dict
|
||||
if a:code == 0
|
||||
" NeoMutt successfully sent the mail. Get rid of the terminal buffer and window.
|
||||
" We can't use plain `bd!` because the terminal window may no longer have focus.
|
||||
execute 'bd!' s:bufnr
|
||||
" Quit if we succeeded in sending the email and there's only one buffer left.
|
||||
if len(getbufinfo({'buflisted': 1})) == 1
|
||||
quit
|
||||
endif
|
||||
else
|
||||
" We didn't send the mail. Go back to the buffer with the message. FIXME: we
|
||||
" probably shouldn't rely on a [plugin][1].
|
||||
execute 'Bd!' s:bufnr
|
||||
endif
|
||||
endfunction
|
||||
" [1]: https://github.com/moll/vim-bbye
|
||||
" [2]: https://github.com/neovim/neovim/issues/4291
|
||||
" [3]: https://vi.stackexchange.com/q/10292
|
||||
" [4]: https://redd.it/46g5wy
|
||||
" [5]: https://github.com/neovim/neovim/issues/5176
|
||||
|
||||
function! s:SendMail()
|
||||
let l:message_file = expand('%')
|
||||
if l:message_file != ''
|
||||
update
|
||||
else
|
||||
" Cope with the buffer not having an associated file. TODO: delete this file if we
|
||||
" succeed in sending the mail?
|
||||
let l:message_file = system('mktemp')
|
||||
execute 'w!' l:message_file
|
||||
endif
|
||||
enew
|
||||
" Tell NeoMutt to use `true` as the editor. This makes it show the compose menu
|
||||
" directly instead of starting Vim inside of Vim. Also don't use the curses pinentry
|
||||
" program. There seem to be some issues when using it from NeoMutt inside Vim inside
|
||||
" screen(1).
|
||||
call termopen('VISUAL=true PINENTRY_USER_DATA=gtk neomutt ' .
|
||||
\ "-e 'set postpone=no sidebar_visible=no assumed_charset=utf-8' " .
|
||||
\ "-H " . l:message_file, {'on_exit': function('s:OnExit')})
|
||||
let s:bufnr = bufnr('%')
|
||||
startinsert
|
||||
endfunction
|
||||
|
||||
nnoremap <buffer> <F7> [s
|
||||
nnoremap <buffer> <F8> ]s
|
||||
nnoremap <buffer> <F9> z=
|
||||
nnoremap <buffer> <F10> zg
|
||||
inoremap <buffer> <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||
nnoremap <buffer> <silent> <C-H> :<C-U>call <SID>SendMail()<CR>
|
||||
nnoremap <buffer> <silent> <localleader>f gg/From:<CR>:nohlsearch<CR>4lC:
|
||||
nnoremap <buffer> <silent> <localleader>t gg/To:<CR>:nohlsearch<CR>2lC:
|
||||
nnoremap <buffer> <silent> <localleader>c gg/Cc:<CR>:nohlsearch<CR>2lC:
|
||||
nnoremap <buffer> <silent> <localleader>b gg/Bcc:<CR>:nohlsearch<CR>3lC:
|
||||
nnoremap <buffer> <silent> <localleader>s gg/Subject:<CR>:nohlsearch<CR>7lC:
|
||||
|
|
|
@ -4,9 +4,9 @@ setlocal tabstop=2 expandtab softtabstop=2 linebreak
|
|||
setlocal autoindent noruler colorcolumn=80
|
||||
setlocal spell spelllang=es,en_us,cjk
|
||||
|
||||
nnoremap <buffer> <F2> <Plug>Vimwiki2HTML
|
||||
nnoremap <buffer> <F5> <Plug>VimwikiMakeDiaryNote
|
||||
nnoremap <buffer> <F6> <Plug>VimwikiDiaryGenerateLinks
|
||||
nnoremap <buffer> <F2> :Vimwiki2HTML<CR>
|
||||
nnoremap <buffer> <F5> :VimwikiMakeDiaryNote<CR>
|
||||
nnoremap <buffer> <F6> :VimwikiDiaryGenerateLinks<CR>
|
||||
nnoremap <buffer> <F7> [S
|
||||
nnoremap <buffer> <F8> ]S
|
||||
nnoremap <buffer> <F9> z=
|
||||
|
|
|
@ -10,21 +10,16 @@ let $GIT_EDITOR = 'nvr -cc split --remote-wait'
|
|||
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
autocmd VimEnter * PlugInstall --sync | call coc#util#install() | source $MYVIMRC
|
||||
endif
|
||||
" }}}
|
||||
" Options {{{
|
||||
set binary
|
||||
set path+=** " Full tab completion with subfolders and all
|
||||
set inccommand=nosplit " Live preview of substitutes and other similar commands
|
||||
set clipboard^=unnamedplus " system clipboard (requires +clipboard)
|
||||
set fileencoding=utf-8 " The encoding written to file.
|
||||
set shell=/bin/zsh " Setting shell to zsh
|
||||
set number " Line numbers on
|
||||
set noshowmode " Always hide mode
|
||||
set showtabline=2 " Always Show tabline
|
||||
set pumheight=12 " Completion window max size
|
||||
set helpheight=12 " Minimum help window height
|
||||
set noswapfile " New buffers will be loaded without creating a swapfile
|
||||
set hidden " Enables to switch between unsaved buffers and keep undo history
|
||||
set lazyredraw " Don't redraw while executing macros (better performance)
|
||||
|
@ -40,7 +35,6 @@ set splitright " Splitting a window will put the new window right of the curr
|
|||
set notimeout " Time out on key codes but not mappings.
|
||||
set ignorecase " Ignore case by default
|
||||
set cursorline " Hightlight the screen line of the cursor
|
||||
set visualbell " Use visual bell instead of beeping
|
||||
set scrolloff=5 " Keep this many lines padding when scrolling
|
||||
set shortmess+=aoOIWcs " Shorten messages and don't show intro
|
||||
set foldnestmax=10 " Deepest fold is 10 levels
|
||||
|
@ -50,39 +44,31 @@ set foldlevelstart=10 " Don't auto open folds after this many levels
|
|||
set selectmode=key " Shift + arrow keys for selecting text
|
||||
set keymodel=startsel " This one complements the one above it
|
||||
set signcolumn=yes " Gutter for diagnostics and git status
|
||||
set modeline " Vim customized by text files commands
|
||||
set tabstop=8 " Number of spaces a <Tab> equals
|
||||
set shiftwidth=4 " Number of spaces to use in auto(indent)
|
||||
set softtabstop=4 " While performing editing operations
|
||||
set shiftround " Round indent to multiple of 'shiftwidth'
|
||||
set breakindent " Keep indentation
|
||||
set expandtab
|
||||
set nosmarttab
|
||||
set expandtab " Use spaces instead of tabs. Mostly for linting reasons
|
||||
set nosmarttab " Don't mix tabs and spaces and do weird stuff
|
||||
set title
|
||||
set redrawtime=500
|
||||
set ttimeoutlen=10
|
||||
set nowritebackup
|
||||
set completeopt-=preview
|
||||
set nostartofline
|
||||
set modeline
|
||||
set undofile
|
||||
set undolevels=1000
|
||||
set undoreload=10000
|
||||
set undodir=$HOME/.config/nvim/undo
|
||||
set formatoptions+=nl
|
||||
set formatoptions-=crot
|
||||
set pastetoggle=<F12>
|
||||
set fillchars+=vert:\
|
||||
set grepprg=rg\ --vimgrep\ --hidden\ --no-heading
|
||||
set grepformat=%f:%l:%c:%m,%f:%l:%m
|
||||
set conceallevel=1
|
||||
set diffopt+=algorithm:histogram,indent-heuristic
|
||||
set pastetoggle=<F12>
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
|
||||
set wildignore+=*.jpg,*.jpeg,*.bmp,*.gif,*.png,*.svg " image
|
||||
set wildignore+=*.manifest " gb
|
||||
set wildignore+=*.o,*.obj,*.exe,*.dll,*.so,*.out,*.class " compiler
|
||||
set wildignore+=*.swp,*.swo,*.swn " vim
|
||||
set wildignore+=*/.git,*/.hg,*/.svn,*/node_modules " vcs
|
||||
|
||||
if &diff
|
||||
set textwidth=80
|
||||
highlight! link DiffText MatchParen
|
||||
|
@ -91,7 +77,7 @@ endif
|
|||
let mapleader="\<SPACE>"
|
||||
let maplocalleader=','
|
||||
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
||||
|
||||
let g:netrw_dirhistmax=0
|
||||
" }}}
|
||||
" Functions {{{
|
||||
function! MyHighlights() abort
|
||||
|
@ -113,65 +99,73 @@ function! Relativize(v) abort
|
|||
endif
|
||||
endfunction
|
||||
|
||||
function! LocalStatusLine() abort
|
||||
let b:status = '%#error#[HELP]%*'
|
||||
return b:status
|
||||
endfunction
|
||||
|
||||
function! CmdLine(str)
|
||||
call feedkeys(':' . a:str)
|
||||
endfunction
|
||||
|
||||
function! s:new_mail()
|
||||
let l:path = system('mktemp --tmpdir XXXXXXXXXX.eml')
|
||||
execute 'sp' l:path
|
||||
0r ~/.config/nvim/templates/skeleton.eml | w | $
|
||||
endfunction
|
||||
command! Mail call s:new_mail()
|
||||
" }}}
|
||||
" AutoCommands {{{
|
||||
if !exists('autocommands_loaded') && has('autocmd')
|
||||
let autocommands_loaded = 1
|
||||
let autocommands_loaded = 1
|
||||
|
||||
aug relativize
|
||||
au BufWinEnter,FocusGained,InsertLeave,WinEnter * call Relativize(1)
|
||||
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call Relativize(0)
|
||||
aug END
|
||||
aug relativize
|
||||
au BufWinEnter,FocusGained,InsertLeave,WinEnter * call Relativize(1)
|
||||
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call Relativize(0)
|
||||
aug END
|
||||
|
||||
aug term_stuff
|
||||
au TermOpen * setlocal nonumber norelativenumber laststatus=0
|
||||
au TermOpen * setlocal signcolumn=no noruler nocursorline
|
||||
aug END
|
||||
aug term_stuff
|
||||
au TermOpen * setlocal nonumber norelativenumber laststatus=0
|
||||
au TermOpen * setlocal signcolumn=no noruler nocursorline
|
||||
aug END
|
||||
|
||||
aug miscs
|
||||
au CursorHold * silent call CocActionAsync('highlight')
|
||||
au CursorHold * call CocActionAsync('doHover')
|
||||
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
au ColorScheme * call MyHighlights()
|
||||
aug END
|
||||
aug miscs
|
||||
au CursorHold * silent call CocActionAsync('highlight')
|
||||
au CursorHold * call CocActionAsync('doHover')
|
||||
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
au ColorScheme * call MyHighlights()
|
||||
aug END
|
||||
|
||||
aug inserts
|
||||
au InsertEnter * norm zz
|
||||
au InsertEnter * setlocal nocursorline
|
||||
au InsertLeave * setlocal cursorline nopaste
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
au FocusLost,TabLeave * call PopOutOfInsertMode()
|
||||
aug END
|
||||
aug inserts
|
||||
au InsertEnter * norm zz
|
||||
au InsertEnter * setlocal nocursorline
|
||||
au InsertLeave * setlocal cursorline nopaste
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
au FocusLost,TabLeave * call PopOutOfInsertMode()
|
||||
aug END
|
||||
|
||||
aug skeletons
|
||||
au BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
||||
au BufNewFile *.sh 0r ~/.config/nvim/templates/sh.skeleton
|
||||
aug END
|
||||
aug skeletons
|
||||
au BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
||||
au BufNewFile *.sh 0r ~/.config/nvim/templates/sh.skeleton
|
||||
aug END
|
||||
|
||||
aug file_types
|
||||
au FileType typescript,json setlocal formatexpr=CocAction('formatSelected')
|
||||
au FileType help setlocal statusline=%!LocalStatusLine()
|
||||
au FileType json syntax match Comment +\/\/.\+$+
|
||||
au FileType make setlocal noexpandtab
|
||||
au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
|
||||
au BufNewFile,BufRead requirements*.txt set syntax=python
|
||||
aug END
|
||||
aug file_types
|
||||
au FileType typescript,json setlocal formatexpr=CocAction('formatSelected')
|
||||
au FileType json syntax match Comment +\/\/.\+$+
|
||||
au FileType make setlocal noexpandtab
|
||||
au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
|
||||
au BufNewFile,BufRead requirements*.txt set syntax=python
|
||||
au BufRead,BufNewFile /tmp/neomutt* set FileType mail
|
||||
aug END
|
||||
|
||||
aug on_save
|
||||
au BufWritePre * :%s/\s\+$//e
|
||||
au BufWritePost *xresources !xrdb %
|
||||
au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
|
||||
au BufWritePost *.tex !pdflatex %
|
||||
au QuitPre * if empty(&buftype) | lclose | endif
|
||||
aug END
|
||||
aug statusline
|
||||
au VimEnter * call UpdateInactiveWindows()
|
||||
au VimEnter,WinEnter,BufWinEnter * call RefreshStatusLine('active')
|
||||
au WinLeave * call RefreshStatusLine('inactive')
|
||||
augroup END
|
||||
|
||||
aug on_save
|
||||
au BufWritePre * :%s/\s\+$//e
|
||||
au BufWritePost *xresources !xrdb %
|
||||
au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
|
||||
au BufWritePost *.tex !pdflatex %
|
||||
au QuitPre * if empty(&buftype) | lclose | endif
|
||||
aug END
|
||||
endif
|
||||
" }}}
|
||||
" {{{ Ale
|
||||
|
@ -290,9 +284,11 @@ nnoremap <leader>rn <Plug>(coc-rename)
|
|||
"}}}
|
||||
" Wiki {{{
|
||||
let g:vimwiki_list = [
|
||||
\{'path': '~/doc/chiptune', 'path_html': '~/doc/chiptune/web', 'template_path': '~/doc/chiptune/tpl', 'template_default': 'def', 'auto_toc': 1, 'auto_tags': 1},
|
||||
\{'path': '~/doc/chiptune', 'path_html': '~/doc/chiptune/web', 'template_path': '~/doc/chiptune/tpl', 'template_default': 'def', 'auto_toc': 1, 'auto_tags': 1, 'auto_export': 1},
|
||||
\{'path': '~/doc/notas', 'auto_toc': 1, 'auto_tags': 1},
|
||||
\{'path': '~/doc/blog', 'auto_toc': 1, 'auto_tags': 1, 'auto_diary_index': 1, 'diary_rel_path': '.', 'diary_index': 'blog', 'diary_header': 'Dailies' }]
|
||||
let g:vimwiki_valid_html_tags = 'b,i,s,u,sub,sup,kbd,br,hr,iframe,a'
|
||||
let g:vimwiki_global_ext = 0
|
||||
let g:vimwiki_hl_headers = 1
|
||||
let g:vimwiki_hl_cb_checked = 1
|
||||
let g:vimwiki_listsyms = '✗○◐●✓'
|
||||
|
@ -324,7 +320,7 @@ Plug 'jpalardy/vim-slime', {'for': ['python', 'foxdot']}
|
|||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'tmsvg/pear-tree'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'vimwiki/vimwiki'
|
||||
Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
|
||||
Plug 'srcery-colors/srcery-vim'
|
||||
call plug#end()
|
||||
" }}}
|
||||
|
@ -367,10 +363,10 @@ let g:modes={
|
|||
\ 'no' : ['%3*', 'NORMAL·OPERATOR PENDING'],
|
||||
\ 'v' : ['%5*', 'VISUAL'],
|
||||
\ 'V' : ['%5*', 'V·LINE'],
|
||||
\ '^V' : ['%5*', 'V·BLOCK'],
|
||||
\ '' : ['%5*', 'V·BLOCK'],
|
||||
\ 's' : ['%7*', 'SELECT'],
|
||||
\ 'S' : ['%7*', 'S·LINE'],
|
||||
\ '^S' : ['%7*', 'S·BLOCK'],
|
||||
\ '' : ['%7*', 'S·BLOCK'],
|
||||
\ 'i' : ['%4*', 'INSERT'],
|
||||
\ 'R' : ['%2*', 'REPLACE'],
|
||||
\ 'Rv' : ['%2*', 'V·REPLACE'],
|
||||
|
@ -384,23 +380,76 @@ let g:modes={
|
|||
\ 't' : ['%*1', 'TERMINAL']
|
||||
\}
|
||||
|
||||
function! LinterStatus() abort
|
||||
let l:counts = ale#statusline#Count(bufnr(''))
|
||||
let l:all_errors = l:counts.error + l:counts.style_error
|
||||
let l:all_non_errors = l:counts.total - l:all_errors
|
||||
return l:counts.total == 0 ? '' : printf(
|
||||
\ ' ⚠ :%d ✖ :%d ',
|
||||
\ l:all_non_errors,
|
||||
\ l:all_errors
|
||||
\)
|
||||
endfunction
|
||||
|
||||
function! ModeColor() abort
|
||||
return get(g:modes, mode(), '%*')[0]
|
||||
return get(g:modes, mode(), '%*')[0]
|
||||
endfunction
|
||||
|
||||
function! CurrentMode() abort
|
||||
return ' ' . get(g:modes, mode(), '-')[1] . ' '
|
||||
return ' ' . get(g:modes, mode(), '-')[1] . ' '
|
||||
endfunction
|
||||
|
||||
function! StatusLine() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.=ModeColor()
|
||||
let l:statusline.=CurrentMode()
|
||||
let l:statusline.=LinePasteMode()
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%1* '
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.=coc#status()
|
||||
let l:statusline.=' %6*'
|
||||
let l:statusline.=LinterStatus()
|
||||
let l:statusline.='%3* %p%% %c '
|
||||
let l:statusline.=''
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! StatusLineNC() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.='%t'
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%= '
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! HelpStatusLine() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.= '%#error#[HELP] %t '
|
||||
let l:statusline.='%1* '
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.=' %p%% '
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! UpdateInactiveWindows()
|
||||
for winnum in range(1, winnr('$'))
|
||||
if winnum != winnr()
|
||||
call setwinvar(winnum, '&statusline', '%!StatusLineNC()')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! RefreshStatusLine(mode)
|
||||
if (a:mode == "active" && &filetype !=? 'help')
|
||||
setlocal statusline=%!StatusLine()
|
||||
else
|
||||
setlocal statusline=%!StatusLineNC()
|
||||
endif
|
||||
if &filetype ==? 'help'
|
||||
setlocal statusline=%!HelpStatusLine()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! LinterStatus() abort
|
||||
let l:counts = ale#statusline#Count(bufnr(''))
|
||||
let l:all_errors = l:counts.error + l:counts.style_error
|
||||
let l:all_non_errors = l:counts.total - l:all_errors
|
||||
return l:counts.total == 0 ? '' : printf(
|
||||
\ ' ⚠ :%d ✖ :%d ',
|
||||
\ l:all_non_errors,
|
||||
\ l:all_errors
|
||||
\)
|
||||
endfunction
|
||||
|
||||
function! LinePasteMode() abort
|
||||
|
@ -411,23 +460,6 @@ function! LinePasteMode() abort
|
|||
return ''
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! Statusline()
|
||||
let b:status=''
|
||||
let b:status.=ModeColor()
|
||||
let b:status.=CurrentMode()
|
||||
let b:status.=LinePasteMode()
|
||||
let b:status.='%1* '
|
||||
let b:status.='%= '
|
||||
let b:status.=coc#status()
|
||||
let b:status.=' %6*'
|
||||
let b:status.=LinterStatus()
|
||||
let b:status.='%3* %p%% %c '
|
||||
let b:status.=''
|
||||
return b:status
|
||||
endfunction
|
||||
|
||||
set statusline=%!Statusline()
|
||||
" }}}
|
||||
" Tabline {{{
|
||||
function! Tabline()
|
||||
|
@ -462,7 +494,6 @@ set tabline=%!Tabline()
|
|||
let g:slime_paste_file = '$HOME/.cache/slime_paste'
|
||||
let g:slime_target = 'neovim'
|
||||
let g:slime_python_ipython = 1
|
||||
|
||||
let g:my_active_terminal_job_id = -1
|
||||
|
||||
function! LaunchTerminal() range
|
||||
|
@ -551,7 +582,7 @@ nnoremap <Bar> gg
|
|||
nnoremap ¿ G
|
||||
|
||||
" Splits
|
||||
nnoremap <silent> <leader>T :call LaunchTerminal()<CR>
|
||||
nnoremap <silent> <leader>t :call LaunchTerminal()<CR>
|
||||
nnoremap <silent> <leader>v :vnew<CR>
|
||||
nnoremap <silent> <leader>s :new<CR>
|
||||
|
||||
|
|
|
@ -1,42 +1,33 @@
|
|||
# BSPWM Hotkeys
|
||||
ctrl + alt + {q,r}
|
||||
bspc {quit,wm -r}
|
||||
bspc {quit,wm --restart && notify-send 'Window Manager restarted'}
|
||||
|
||||
super + {_,shift} + w
|
||||
bspc node -{c,k}
|
||||
|
||||
super + f
|
||||
bspc node -t $(bspc query -N -n -n .tiled >/dev/null && echo floating || echo tiled)
|
||||
super + {_,shift} + f
|
||||
bspc node -t {$(bspc query -N -n -n .tiled >/dev/null && echo floating || echo tiled),fullscreen}
|
||||
|
||||
super + {_,shift,ctrl,alt} + {h,j,k,l}
|
||||
{foco,mover,agrandar,bspc node -p} {west,south,north,east}
|
||||
|
||||
super + alt + space
|
||||
bspc node -p cancel
|
||||
|
||||
super + {1-9,0}
|
||||
bspc desktop -f {1-9,10} && notifocus
|
||||
|
||||
super + shift + {1-9,0}
|
||||
bspc node -d {1-9,10}
|
||||
|
||||
super + {braceleft,braceright}
|
||||
bspc desktop -f {prev.occupied,next.occupied}
|
||||
|
||||
alt + {_,shift} + Tab
|
||||
bspc node -f {next,prev}.local.normal
|
||||
|
||||
super + {comma,period}
|
||||
bspc node @/ -R {90,270}
|
||||
|
||||
super + {Up,Down,Left,Right}
|
||||
bspc node -f @{parent,brother,first,second}
|
||||
super + {_,shift} + ntilde
|
||||
whid {hide,dmenu}
|
||||
|
||||
super + {equal, plus, minus}
|
||||
bspc node -l {normal, above, below}
|
||||
|
||||
super + o
|
||||
bspc node @parent -B
|
||||
super + alt + space
|
||||
bspc node -p cancel
|
||||
|
||||
super + {Up,Down,Left,Right}
|
||||
bspc node -f @{parent,brother,first,second}
|
||||
|
||||
super + y
|
||||
bspc node -s biggest.local
|
||||
|
@ -44,18 +35,12 @@ super + y
|
|||
super + {_,shift,ctrl} + u
|
||||
bspc node {@/ -B,@brother -B,@/ -E}
|
||||
|
||||
super + alt + u
|
||||
euclid_balancer
|
||||
|
||||
super + {_,shift} + ntilde
|
||||
whid {hide,dmenu}
|
||||
|
||||
# Run Applications
|
||||
super + {b,q,m,s,v,n}
|
||||
{$BROWSER,powermenu,monisel,dswitcher,pavucontrol,notas}
|
||||
|
||||
super + {a,x,i,z}
|
||||
alacritty {_,--class=flota,--class=flota -e connman-ncurses,--class=multi -e termux}
|
||||
super + {a,x,i,z,c}
|
||||
alacritty {_,--class=flota,--class=flota -e connman-ncurses,--class=multi -e termux,class=flota -e neomutt +'inoremap <C-Space> <Esc>:Snippets<CR>' +Mail +1bw +startinsert"}
|
||||
|
||||
super + shift + x
|
||||
tmenux
|
||||
|
@ -81,9 +66,3 @@ XF86Audio{Prev,Next,Play}
|
|||
|
||||
XF86MonBrightness{Down,Up}
|
||||
brillo {down,up}
|
||||
|
||||
XF86Audio{Lower,Raise}Volume
|
||||
volu {down,up}
|
||||
|
||||
XF86AudioMute
|
||||
amixer sset Master toggle
|
||||
|
|
|
@ -1 +1 @@
|
|||
# [ -z $DISPLAY ] && [ "$(fgconsole)" -eq 1 ] && exec startx -- -keeptty -nolisten tcp
|
||||
[ -z $DISPLAY ] && [ "$(fgconsole)" -eq 1 ] && exec startx -- -keeptty -nolisten tcp
|
|
@ -1,147 +1,90 @@
|
|||
# -*- mode: shell-script -*-
|
||||
# vim:ft=zsh
|
||||
# Opciones principales {{{
|
||||
autoload -Uz compinit promptinit
|
||||
autoload -Uz compinit
|
||||
_comp_files=($XDG_CACHE_HOME/zcompdump(Nm-20))
|
||||
if (( $#_comp_files )); then
|
||||
compinit -i -C
|
||||
else
|
||||
compinit -i
|
||||
autoload -Uz is-at-least
|
||||
if [[ ${ZSH_VERSION} != 5.1.1 && ${TERM} != "dumb" ]]; then
|
||||
if is-at-least 5.2; then
|
||||
autoload -Uz bracketed-paste-url-magic
|
||||
zle -N bracketed-paste bracketed-paste-url-magic
|
||||
else
|
||||
if is-at-least 5.1; then
|
||||
autoload -Uz bracketed-paste-magic
|
||||
zle -N bracketed-paste bracketed-paste-magic
|
||||
fi
|
||||
fi
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
fi
|
||||
unset _comp_files
|
||||
promptinit
|
||||
|
||||
autoload -U colors && colors
|
||||
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
|
||||
unsetopt CASE_GLOB
|
||||
unsetopt FLOW_CONTROL
|
||||
setopt GLOBDOTS
|
||||
setopt NUMERICGLOBSORT
|
||||
setopt AUTOCD
|
||||
setopt EXTENDEDGLOB
|
||||
setopt BRACE_CCL
|
||||
setopt COMBINING_CHARS
|
||||
setopt RC_QUOTES
|
||||
setopt LONG_LIST_JOBS
|
||||
setopt AUTO_RESUME
|
||||
setopt RM_STAR_WAIT
|
||||
setopt LIST_TYPES
|
||||
setopt CORRECT
|
||||
setopt NO_LIST_BEEP
|
||||
setopt COMPLETE_IN_WORD
|
||||
setopt ALWAYS_TO_END
|
||||
setopt PATH_DIRS
|
||||
setopt AUTO_MENU
|
||||
setopt AUTO_LIST
|
||||
setopt AUTO_PARAM_SLASH
|
||||
setopt MARK_DIRS
|
||||
setopt LIST_PACKED
|
||||
setopt MAGIC_EQUAL_SUBST
|
||||
setopt NO_NOMATCH
|
||||
setopt AUTO_CONTINUE
|
||||
# }}}
|
||||
# Autocompletar {{{
|
||||
zstyle ':completion:*' list-colors $LS_COLORS
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' matcher-list '' '+m:{[:lower:]}={[:upper:]}' '+m:{[:upper:]}={[:lower:]}' '+m:{_-}={-_}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*' verbose true
|
||||
zstyle ':completion:*' format $'\n %F{yellow}--- %d ---%f'
|
||||
zstyle ':completion:*' list-separator "--"
|
||||
zstyle ':completion:*' list-dirs-first true
|
||||
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||
zstyle ':completion:*:default' select-prompt ' --- Match %M %P ---'
|
||||
zstyle ':completion:*:options' description 'yes'
|
||||
zstyle ':completion:*:options' auto-description '%d'
|
||||
zstyle ':completion:*:expand:*' tag-order all-expansions
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:correct:*' insert-unambiguous true
|
||||
zstyle ':completion:*:correct:*' original true
|
||||
zstyle ':completion:*:corrections' format $'\n %F{green}--- %d (errors: %e) ---%f'
|
||||
zstyle ':completion:*:descriptions' format $'\n %F{yellow}--- %d ---%f'
|
||||
zstyle ':completion:*:messages' format $'\n %F{purple}--- %d ---%f'
|
||||
zstyle ':completion:*:warnings' format $'\n %F{red}-- No Matches Found --%f'
|
||||
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||
zstyle ':completion:*:approximate:' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )'
|
||||
zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*'
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "$XDG_CACHE_HOME/zcompcache"
|
||||
zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~'
|
||||
zstyle ':completion:*:processes' command 'ps -au $USER -o pid,stat,%cpu,%mem,cputime,command'
|
||||
zstyle ':completion:*:killall:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||
zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
|
||||
zstyle ':completion:*:man:*' menu yes select
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
zstyle ':completion:*:parameters' list-colors '=*=34'
|
||||
zstyle ':completion:*:commands' list-colors '=*=32'
|
||||
zstyle ':completion:*:builtins' list-colors '=*=1;38;5;142'
|
||||
zstyle ':completion:*:aliases' list-colors '=*=2;38;5;120'
|
||||
zstyle ':completion:*:options' list-colors '=^(-- *)=34'
|
||||
zstyle ':completion:*:default' list-colors '=(#b)*(-- *)=36=33' '=*=36'
|
||||
zstyle ':completion::*:kill:*:*' command 'ps xf -U $USER -o pid,%cpu,cmd'
|
||||
zstyle ':completion:*:*:kill:*' menu yes select
|
||||
zstyle ':completion:*:*:kill:*' force-list always
|
||||
zstyle ':completion:*:*:kill:*' insert-ids single
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
||||
zstyle ':completion:*' accept-exact '*(N)'
|
||||
zstyle ':completion:*' ignore-parents pwd
|
||||
zstyle ':completion:*' rehash true
|
||||
zmodload -i zsh/complist
|
||||
setopt COMBINING_CHARS # Combine accents with the base character.
|
||||
setopt INTERACTIVE_COMMENTS # Enable comments in interactive shell.
|
||||
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
|
||||
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
|
||||
setopt LONG_LIST_JOBS # List jobs in the long format by default.
|
||||
setopt AUTO_RESUME # Attempt to resume existing job before creating a new process.
|
||||
setopt NOTIFY # Report status of background jobs immediately.
|
||||
unsetopt BG_NICE # Don't run all background jobs at a lower priority.
|
||||
unsetopt HUP # Don't kill jobs on shell exit.
|
||||
unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
|
||||
# }}}
|
||||
# Historial {{{
|
||||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help:* --version:* -v:man *:up:rtv *"
|
||||
HISTFILE="$ZDOTDIR/histfile"
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
setopt BANG_HIST
|
||||
setopt EXTENDED_HISTORY
|
||||
setopt HIST_EXPIRE_DUPS_FIRST
|
||||
setopt HIST_FIND_NO_DUPS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_REDUCE_BLANKS
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
setopt HIST_VERIFY
|
||||
setopt INC_APPEND_HISTORY
|
||||
setopt SHARE_HISTORY
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||
setopt SHARE_HISTORY # Share history between all sessions.
|
||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
||||
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
|
||||
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
|
||||
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
|
||||
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
|
||||
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
|
||||
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||
# }}}
|
||||
# Directorios {{{
|
||||
setopt AUTO_CD # Auto changes to a directory without typing cd.
|
||||
setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
|
||||
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
||||
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
|
||||
setopt PUSHD_TO_HOME # Push to home directory when no argument is given.
|
||||
setopt CDABLE_VARS # Change directory to a path stored in a variable.
|
||||
setopt MULTIOS # Write to multiple descriptors.
|
||||
setopt EXTENDED_GLOB # Use extended globbing syntax.
|
||||
#}}}
|
||||
# Plugins y extras {{{
|
||||
foreach extra (
|
||||
up.plugin.zsh
|
||||
teclas.zsh
|
||||
extras.zsh
|
||||
aliases.plugin.zsh
|
||||
zsh-completions/zsh-completions.plugin.zsh
|
||||
zsh-system-clipboard/zsh-system-clipboard.zsh
|
||||
git-extras-completion.zsh
|
||||
zsh-autopair/autopair.zsh
|
||||
lf-icons.zsh
|
||||
) {
|
||||
source $ZDOTDIR/$extra
|
||||
}
|
||||
|
||||
foreach programa (
|
||||
fzf/key-bindings.zsh
|
||||
fzf/completion.zsh
|
||||
fzf/key-bindings.zsh
|
||||
) {
|
||||
source /usr/share/doc/$programa
|
||||
}
|
||||
|
||||
foreach extra (
|
||||
teclas.zsh
|
||||
aliases.zsh
|
||||
up.plugin.zsh
|
||||
lf-icons.zsh
|
||||
zsh-autopair/autopair.zsh
|
||||
zsh-system-clipboard/zsh-system-clipboard.zsh
|
||||
git-extras-completion.zsh
|
||||
autocompletar.zsh
|
||||
) {
|
||||
source $ZDOTDIR/$extra
|
||||
}
|
||||
|
||||
typeset -g ZSH_SYSTEM_CLIPBOARD_TMUX_SUPPORT='true'
|
||||
|
||||
source $XDG_CONFIG_HOME/broot/launcher/bash/br
|
||||
source $XDG_DATA_HOME/lscolors.sh
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source $ZDOTDIR/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
source $XDG_DATA_HOME/lscolors.sh
|
||||
# }}}
|
||||
# Prompt {{{
|
||||
autoload -Uz promptinit && promptinit
|
||||
|
||||
function precmd() {
|
||||
# Print a newline before the prompt, unless it's the
|
||||
# first prompt in the process.
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
# Add zsh-completions to $fpath.
|
||||
fpath=("${0:h}/zsh-completions/src" $fpath)
|
||||
|
||||
setopt COMPLETE_IN_WORD # Complete from both ends of a word.
|
||||
setopt ALWAYS_TO_END # Move cursor to the end of a completed word.
|
||||
setopt PATH_DIRS # Perform path search even on command names with slashes.
|
||||
setopt AUTO_MENU # Show completion menu on a successive tab press.
|
||||
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
|
||||
setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a trailing slash.
|
||||
setopt EXTENDED_GLOB # Needed for file modification glob modifiers with compinit
|
||||
unsetopt MENU_COMPLETE # Do not autoselect the first completion entry.
|
||||
unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
|
||||
|
||||
autoload -Uz compinit
|
||||
_comp_files=($XDG_CACHE_HOME/.zcompdump(Nm-20))
|
||||
if (( $#_comp_files )); then
|
||||
compinit -i -C
|
||||
else
|
||||
compinit -i
|
||||
fi
|
||||
unset _comp_files
|
||||
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "$XDG_CACHE_HOME/zcompcache"
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*:*:*:*:*' menu select
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:options' description 'yes'
|
||||
zstyle ':completion:*:options' auto-description '%d'
|
||||
zstyle ':completion:*:corrections' format '%F{green}%d (errors: %e) %f'
|
||||
zstyle ':completion:*:descriptions' format '%F{yellow}%d %f'
|
||||
zstyle ':completion:*:messages' format '%F{purple}%d %f'
|
||||
zstyle ':completion:*:warnings' format '%F{red}no matches found %f'
|
||||
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
|
||||
zstyle ':completion:*' format '%F{yellow}%d %f'
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*' completer _complete _match _approximate
|
||||
zstyle ':completion:*:match:*' original only
|
||||
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
||||
zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)'
|
||||
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
|
||||
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
|
||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
zstyle ':completion:*:history-words' stop yes
|
||||
zstyle ':completion:*:history-words' remove-all-dups yes
|
||||
zstyle ':completion:*:history-words' list false
|
||||
zstyle ':completion:*:history-words' menu yes
|
||||
zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-}
|
||||
zstyle ':completion:*:(rm|kill|diff):*' ignore-line other
|
||||
zstyle ':completion:*:rm:*' file-patterns '*:all-files'
|
||||
zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w'
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01'
|
||||
zstyle ':completion:*:*:kill:*' menu yes select
|
||||
zstyle ':completion:*:*:kill:*' force-list always
|
||||
zstyle ':completion:*:*:kill:*' insert-ids single
|
||||
zstyle ':completion:*:man:*' menu yes select
|
||||
zstyle ':completion:*:manuals' separate-sections true
|
||||
zstyle ':completion:*:manuals.(^1*)' insert-sections true
|
||||
zstyle ':completion:*:parameters' list-colors '=*=34'
|
||||
zstyle ':completion:*:commands' list-colors '=*=32'
|
||||
zstyle ':completion:*:builtins' list-colors '=*=1;38;5;142'
|
||||
zstyle ':completion:*:aliases' list-colors '=*=2;38;5;120'
|
||||
zstyle ':completion:*:options' list-colors '=^(-- *)=34'
|
||||
zstyle ':completion:*:default' list-colors '=(#b)*(-- *)=36=33' '=*=36'
|
||||
zstyle ':completion:*' rehash true
|
||||
zstyle ':completion:*' list-separator " "
|
||||
zstyle ':completion:*' list-dirs-first true
|
|
@ -52,10 +52,9 @@ key[PageUp]="$terminfo[kpp]"
|
|||
key[PageDown]="$terminfo[knp]"
|
||||
# }}}
|
||||
# General use {{{
|
||||
bindkey -M menuselect ' ' accept-line
|
||||
bindkey -M menuselect '\C-?' undo
|
||||
bindkey "^L" tmux-clear-screen
|
||||
bindkey '^X' run-with-sudo
|
||||
bindkey '^U' backward-kill-line
|
||||
# }}}
|
||||
# Insert {{{
|
||||
bindkey -M viins '^K' up-history # ^K to previous command.
|
||||
|
@ -66,8 +65,6 @@ bindkey -M viins '^Y' redo
|
|||
bindkey -M viins '^P' up-line-or-beginning-search
|
||||
bindkey -M viins '^N' down-line-or-beginning-search
|
||||
bindkey -M viins '^U' history-incremental-pattern-search-backward
|
||||
#bindkey -M viins '^?' backward-delete-char # Delete left char with backspace key.
|
||||
#bindkey -M viins '^[[3~' delete-char # Ensure delete key always delete forward.
|
||||
bindkey -M viins '^[[A' history-substring-search-up
|
||||
bindkey -M viins '^[[B' history-substring-search-down
|
||||
|
||||
|
@ -76,12 +73,11 @@ bindkey -M viins '^[[B' history-substring-search-down
|
|||
[[ -n "$key[Insert]" ]] && bindkey -M viins -- "$key[Insert]" overwrite-mode
|
||||
[[ -n "$key[Backspace]" ]] && bindkey -M viins -- "$key[Backspace]" backward-delete-char
|
||||
[[ -n "$key[Delete]" ]] && bindkey -M viins -- "$key[Delete]" delete-char
|
||||
[[ -n "$key[Up]" ]] && bindkey -M viins -- "$key[Up]" history-substring-search-up
|
||||
[[ -n "$key[Down]" ]] && bindkey -M viins -- "$key[Down]" history-substring-search-down
|
||||
[[ -n "$key[Left]" ]] && bindkey -M viins -- "$key[Left]" backward-char
|
||||
[[ -n "$key[Right]" ]] && bindkey -M viins -- "$key[Right]" forward-char
|
||||
[[ -n "$key[PageUp]" ]] && bindkey -M viins -- "$key[PageUp]" history-beginning-search-backward
|
||||
[[ -n "$key[PageDown]" ]] && bindkey -M viins -- "$key[PageDown]" history-beginning-search-forward
|
||||
[[ -n "$key[Up]" ]] && bindkey -M viins -- "$key[Up]" history-substring-search-up
|
||||
[[ -n "$key[Down]" ]] && bindkey -M viins -- "$key[Down]" history-substring-search-down
|
||||
# }}}
|
||||
# Normal {{{
|
||||
bindkey -M vicmd 'j' down-line # Override down-line-or-history.
|
||||
|
@ -95,9 +91,9 @@ bindkey -M vicmd 'ds' delete-surround # Delete surround operator.
|
|||
bindkey -M vicmd 'ys' add-surround # Add surround operator.
|
||||
bindkey -M vicmd '?' history-incremental-search-backward
|
||||
bindkey -M vicmd '/' history-incremental-search-forward
|
||||
bindkey -M vicmd '^Y' redo
|
||||
bindkey -M vicmd '^[[A' history-substring-search-up
|
||||
bindkey -M vicmd '^[[B' history-substring-search-down
|
||||
bindkey -M vicmd '^Y' redo
|
||||
# }}}
|
||||
# Visual {{{
|
||||
bindkey -M visual 'H' vi-beginning-of-line # Go beginning of line.
|
||||
|
|
|
@ -16,7 +16,7 @@ function () {
|
|||
'music' '~/.config/ncmpcpp/config'
|
||||
'tmux' '~/.tmux.conf'
|
||||
'xinit' '~/.xinitrc'
|
||||
'alias' '~/.config/zsh/aliases.plugin.zsh'
|
||||
'alias' '~/.config/zsh/aliases.zsh'
|
||||
'term' '~/.config/alacritty.yml'
|
||||
'env' '~/.zshenv'
|
||||
)
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/dash
|
||||
|
||||
if [ "$(pgrep -cx euclid_balancer)" -gt 1 ] ; then
|
||||
killall euclid_balancer && exit 0
|
||||
else
|
||||
|
||||
bspc subscribe node_add node_remove node_state node_geometry | while read line; do
|
||||
for wid in $(bspc query -N -d -n .window); do
|
||||
bspc node "${wid}#@north" -B || true
|
||||
bspc node "${wid}#@south" -B || true
|
||||
done
|
||||
done
|
||||
|
||||
fi
|
|
@ -11,10 +11,10 @@ options="$shutdown\n$reboot\n$suspend\n$lock\n$log_out"
|
|||
|
||||
chosen="$(echo -e "$options" | dmenu -w 120 -i -p "⏻ ")"
|
||||
case $chosen in
|
||||
"$shutdown") loginctl poweroff;;
|
||||
"$reboot") loginctl reboot;;
|
||||
"$suspend") loginctl suspend;;
|
||||
"$shutdown") sudo shutdown -h now;;
|
||||
"$reboot") sudo reboot;;
|
||||
"$suspend") sudo zzz;;
|
||||
"$lock") xset s activate;;
|
||||
"$log_out") loginctl terminate-user "$(id -u "$USER")";;
|
||||
"$log_out") bspc quit;;
|
||||
*) exit 0;;
|
||||
esac
|
||||
|
|
4
.xinitrc
4
.xinitrc
|
@ -3,10 +3,6 @@
|
|||
[ -d /etc/X11/xinit/xinitrc.d ] && \
|
||||
for f in /etc/X11/xinit/xinitrc.d/*; do [ -x "$f" ] && . "$f"; done && unset f
|
||||
|
||||
# if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
|
||||
# eval `dbus-launch --sh-syntax`
|
||||
# fi
|
||||
|
||||
xrdb -merge "$XDG_CONFIG_HOME"/X11/xresources
|
||||
setxkbmap -option caps:escape
|
||||
xsetroot -cursor_name left_ptr &
|
||||
|
|
12
.zshenv
12
.zshenv
|
@ -22,9 +22,17 @@ export BAT_STYLE="numbers,changes,header"
|
|||
export BAT_THEME="TwoDark"
|
||||
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
|
||||
export QT_QPA_PLATFORMTHEME="gtk2"
|
||||
export QT_QPA_PLATFORMTHEME="qt5ct"
|
||||
|
||||
# export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
|
||||
if test -z "${XDG_RUNTIME_DIR}"; then
|
||||
export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
|
||||
if ! test -d "${XDG_RUNTIME_DIR}"; then
|
||||
mkdir "${XDG_RUNTIME_DIR}"
|
||||
chmod 0700 "${XDG_RUNTIME_DIR}"
|
||||
fi
|
||||
fi
|
||||
|
||||
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
|
|
Reference in New Issue