dgy
/
hexagons
Archived
1
0
Fork 0

Cuando no puedo dormir, retoco mi configuración.

Bueno, hice varios cambios a una serie de cosas, pero en general todo
sigue funcionando de la misma manera.

Neovim: saque un par de plugins en esa batalla eterna por usar menos de
ellos y mas maneras nativas de hacer las cosas, esto trajo aparejado que
algunos archivos no existen mas.
Tambien logre reducir algunos un poco, y reacomodar ciertas cosas, como
el statusline y algunas configuraciones especificas de archivos. Igual
ya se me ocurrieron un par de ideas para cambiar un par de cuestiones
mas, que seguro estaran en el proximo commit.

Neomutt: Varios cambios a la configuracion general para una mejor
experiencia y uso. Tambien hubo cambios por cuenta pero eso creo que va
a quedar en un repo privado en algun momento.

Git: mejor integracion con otras herramientas como delta y fzf.

Scripts: Ediciones de estilo mas que nada.

Y como siempre modificaciones pequeñas aqui y alla.
This commit is contained in:
deadguy 2021-02-09 13:45:49 -03:00
parent bde35e4033
commit dc1ca55fdf
Signed by: dgy
GPG Key ID: 37CA55B52CF63730
69 changed files with 587 additions and 621 deletions

View File

@ -15,15 +15,15 @@ scrolling:
# Font configuration
font:
normal:
family: PragmataPro Mono Liga
family: PragmataPro Mono
style: Regular
italic:
family: PragmataPro Mono Liga
family: PragmataPro Mono
style: Italic
bold:
family: PragmataPro Mono Liga
family: PragmataPro Mono
style: Bold
# Point size

View File

@ -2,4 +2,4 @@
--italic-text=always
--style="numbers,changes,header"
--color=always
--terminal-width=-10
--terminal-width=120

View File

@ -2,14 +2,8 @@
bspmonis &
bspc rule -r "*"
bspc config border_width 2
bspc config window_gap 6
bspc config top_padding 3
bspc config left_padding 0
bspc config right_padding 0
bspc config bottom_padding 23
bspc config split_ratio 0.5
# Opciones
@ -17,8 +11,6 @@ bspc config gapless_monocle true
bspc config ignore_ewmh_focus true
bspc config pointer_follows_focus true
bspc config removal_adjustment true
bspc config remove_unplugged_monitors false
bspc config remove_disabled_monitors false
bspc config honor_size_hints false
bspc config directional_focus_tightness low
bspc config automatic_scheme longest_side
@ -45,7 +37,7 @@ bspc rule -a QjackCtl state=floating
bspc rule -a mpv state=floating
bspc rule -a Alacritty:flota state=floating
bspc rule -a Sxiv:flota state=floating
bspc rule -a Firefox state=floating
bspc rule -a Firefox:Browser state=floating
bspc rule -a Zathura state=tiled
bspc rule -a gzdoom state=fullscreen

View File

@ -92,13 +92,4 @@
foreground = "#e0d0c3"
frame_color = "#e53935"
timeout = 60
[mail]
appname = neomutt
new_icon = "/home/deadguy/img/.icn/correo.png"
[rss]
appname = newsboat
new_icon = "/home/deadguy/img/.icn/rss.png"
# vim: ft=cfg

View File

@ -25,7 +25,7 @@
<alias>
<family>monospace</family>
<prefer>
<family>NotoSansMono Nerd Font</family>
<family>PragmataPro Mono</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>

View File

@ -1,5 +1,6 @@
[alias]
st = status
co = checkout
fx = commit --fixup=HEAD
ci = commit -v
cm = commit -m
@ -9,8 +10,9 @@
amend = commit --amend -v
full = show --format=fuller
noed = commit --amend --no-edit
tr = log --graph --date-order --date=short --pretty=format:'%C(cyan)%h %C(blue)%ar%C(auto)%d%C(yellow)%s%+b %C(black)%ae'
tr = log --graph --date-order --date=short --pretty=format:'%C(cyan)%h %C(blue)%ar%C(auto)%d %C(yellow)%s%+b %C(black)%ae'
fz = !sha=$( git -c color.ui=always log --oneline -n 1000 | fzf +s --no-multi --prompt 'Fixup> ' ) && git commit --fixup "${sha%% *}"
fr = !sha=$( git -c color.ui=always log --oneline -n 1000 | fzf +s --no-multi --prompt 'Revert> ' ) && git revert "${sha%% *}"
wd = "!f() { git --paginate diff --dirstat=cumulative,files,0 ${1:-HEAD} | awk '{print $2}' | cut -d / -f1-${2:-4} | sort | uniq; }; f"
[http]
@ -21,29 +23,60 @@
autocrlf = input
whitespace = warn
excludesfile = /home/deadguy/.config/git/gitignore
pager = delta
pager = "{ \
COLUMNS=$(tput cols); \
if [ $COLUMNS -ge 80 ] && [ -z $FZF_PREVIEW_COLUMNS ]; then \
delta --side-by-side -w $COLUMNS; \
elif [ $COLUMNS -ge 160 ] && [ ! -z $FZF_PREVIEW_COLUMNS ]; then \
delta --side-by-side -w $FZF_PREVIEW_COLUMNS; \
else \
delta; \
fi \
}"
[interactive]
diffFilter = delta --color-only
[delta]
features = side-by-side line-numbers decorations
syntax-theme = zenburn
plus-style = syntax "#003800"
minus-style = syntax "#3f0001"
whitespace-error-style = 22 reverse
side-by-side = false
line-numbers = true
syntax-theme = gruvbox
hunk-header-style = omit
file-style = blue
file-decoration-style = blue ul ol
zero-style = dim syntax
minus-non-emph-style = dim red
minus-emph-style = bold red 52
minus-empty-line-marker-style = normal "#3f0001"
plus-non-emph-style = dim green
plus-emph-style = bold green 22
plus-empty-line-marker-style = normal "#002800"
whitespace-error-style = reverse white
file-added-label = [+]
file-copied-label = [C]
file-modified-label = [M]
file-removed-label = [-]
file-renamed-label = [R]
line-numbers-left-format = "{nm:>1} "
line-numbers-right-format = "{np:>1} "
line-numbers-minus-style = red italic
line-numbers-plus-style = green italic
[delta "decorations"]
commit-decoration-style = yellow ul ol
file-style = yellow ul
file-decoration-style = none
hunk-header-decoration-style = cyan box
[delta "line-numbers"]
line-numbers-left-style = cyan
line-numbers-right-style = cyan
line-numbers-minus-style = 124
line-numbers-plus-style = 28
[delta "flashy"]
side-by-side = true
line-numbers = true
decorations = true
syntax-theme = dracula
plus-style = syntax "#003800"
minus-style = syntax "#3f0001"
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
hunk-header-decoration-style = cyan box ul
line-numbers-left-style = cyan
line-numbers-right-style = cyan
line-numbers-minus-style = 124
line-numbers-plus-style = 28
[web]
browser = firefox

View File

@ -3,29 +3,32 @@ source neomuttrc.d/gpg.rc
source neomuttrc.d/bindings.neomuttrc
source neomuttrc.d/colors.neomuttrc
source neomuttrc.d/powerline.neomuttrc
source neomuttrc.d/news.neomuttrc
unset help
set mailcap_path = ~/.config/neomutt/mailcap
unset signature
set mime_type_query_command = "file --mime-type -b %s"
set mailcap_path = ~/.config/neomutt/mailcap
set sort = threads
set sort_aux = reverse-last-date-received
set strict_threads
set smtp_authenticators = 'gssapi:login'
set attribution = "En %{!%F a las %R}, %n escribió:"
set date_format = "%F %R"
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set quote_regex = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set send_charset = "utf-8"
set forward_format = "Fwd: %s" # Format of subject when forwarding
set timeout = 2
set sleep_time = 0 # Pause 0 seconds for informational messages
set mail_check = 60 # To avoid lags using IMAP
set wrap = 100
set use_envelope_from = yes
set edit_headers = yes
set rfc2047_parameters = yes
set smart_wrap = yes
set reverse_realname = yes # Use any real name provided when replying
set mime_forward = yes # Attachments are forwarded with mail
set auto_tag = yes # Automatically apply actions to all tagged messages
set delete = yes # Don't ask, do.
set edit_headers = yes # Allow editing fields
set sidebar_visible = no # Not needed
set markers = no # Disables the `+` displayed at line wraps
set mark_old = no # Unread mail stay unread until read
@ -35,14 +38,11 @@ set fast_reply # skip to compose when replying
set fcc_attach # save attachments with the body
set forward_quote # include message in forwards
set reverse_name # reply as whomever it was to
set include # include message in replies
set menu_scroll # scroll in menus
set autoedit
set edit_headers
set sort_re
set arrow_cursor
set pipe_decode
set pager_index_lines = 13
set pager_index_lines = 10
set pager_context = 3
set pager_stop
@ -55,6 +55,9 @@ auto_view text/x-patch
auto_view application/ics
auto_view application/pgp-encrypted
set print_command = "nvim -R -c 'set ft=mail background=dark \
popt=header:0' -c 'ha' -c 'q' -"
# neomutt doesn't have this yet :(
# set editor = "carta.sh `echo $EDITOR`"
# set background_edit = `[ -n "$TMUX" ] && echo 'yes' || echo 'no'`
@ -62,8 +65,8 @@ auto_view application/pgp-encrypted
# Header Options
ignore *
unhdr_order *
unignore from subject to cc date x-mailer x-url user-agent
hdr_order date from to cc subject
unignore from subject to cc bcc date x-mailer x-url user-agent
hdr_order date from to cc bcc subject
# Warns if replying to multiple recipt email
reply-hook "~C 2" "set sleep_time=10\;echo 'Warning, original message has multiple recipients!'\;set sleep_time=1"

View File

@ -43,6 +43,20 @@ bind pager,attach h exit
bind index,pager,browser d half-down
bind index,pager,browser u half-up
# View an attachment in the GUI browser
macro attach \cv "\
<enter-command> set my_pipe_decode=\$pipe_decode pipe_decode<Enter>\
<pipe-message> attachview<Enter>\
<enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
"Open attachment in GUI browser"
# twtxt
macro index,pager,attach,compose <esc>T "\
<enter-command> set my_pipe_decode=\$pipe_decode nopipe_decode<Enter>\
<pipe-message> twt-reply<Enter>\
<enter-command> set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<Enter>" \
"Reply to current twt"
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
macro index O "<shell-escape>mbsync -c ~/.config/isync/mbsyncrc -a<enter>" "run mbsync to sync all mail"
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
@ -51,8 +65,7 @@ macro index A "<limit>all\n" "show all messages (undo limit)"
macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
macro index,pager <f1> '<sync-mailbox><enter-command>source /home/deadguy/.config/neomutt/accounts/6-dgy@fuckup.club.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to dgy@fuckup.club" # mw-autogenerated
macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/1-alex.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to vidaar@gmail.com"
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/2-alejo.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to alejo.jardon@gmail.com"
macro index,pager <f4> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/4-iamz@airmail.cc.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to iamz@airmail.cc"
macro index,pager <f5> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/3-git.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to adeadgit@gmail.com"
macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/3-dgy@texto-plano.xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to adeadgit@gmail.com"
macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/1-vidaar@gmail.com.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to vidaar@gmail.com"
macro index,pager <f4> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/2-alejo.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to alejo.jardon@gmail.com"
macro index,pager <f5> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/4-iamz@airmail.cc.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to iamz@airmail.cc"

View File

@ -2,28 +2,27 @@
# Powerline / nerdfont
# This is a bit "hackish" due to neomutt limitations
#
# Author: Sheoak https://github.com/sheoak/neomutt-powerline-nerdfonts
# Modified by Deadguy
set index_format=" %zs %zc %zt %<[y?%<[m?%<[d?%[%R ]&%[%a %d]>&%[%b %d]>&%[%F ]> %-28.28L %?M?(%1M)& ? %?X?& ? %s"
set index_format=" %zs %zc %zt %<[y?%<[m?%<[d?%[%R ]&%[%a %d]>&%[%b %d]>&%[%F ]> %-28.28L %?K?%15.14K& ? %?M?(%1M)& ? %?X? & ? %s %> %?g?%g?"
set pager_format="\n %n %T %s%*  %{!%F · %R} %?X? %X?%P\n \n"
set status_format = " %f %?r? %m ?%?n? %n ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? \n \n"
set vfolder_format = " %N %?n?%3n& ? %8m  · %f"
set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M"
set pager_format="\n%n %T %s%*  %{!%F · %R} %?X? %X? %P\n \n"
set status_format = " %f %?r? %m ?%?n? %n ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? %> %P\n \n"
set vfolder_format = " %N %?n?%3n& ? %8m  · %f"
set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M"
# no addressed to me, to me, group, cc, sent by me, mailing list
set to_chars=""
# not addressed to me, to me, not only recipient, cc, sent by me, mailing list, reply-to
set to_chars=" "
# unchanged mailbox, changed, read only, attach mode
set status_chars = " "
ifdef crypt_chars set crypt_chars = " "
set flag_chars = " "
ifdef crypt_chars set crypt_chars = " "
set flag_chars = "   "
set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted"
tag-transforms "replied" "↻ " \
"encrytpted" "" \
"signed" "" \
"attachment" "" \
tag-transforms "replied" " " \
"encrytpted" " " \
"signed" " " \
"attachment" " " \
# The formats must start with 'G' and the entire sequence is case sensitive.
tag-formats "replied" "GR" \
@ -38,8 +37,8 @@ color status color12 default '(\s)([a-zA-Z0-9])'
color status color12 default '( )'
color status color12 default '(\S)'
color status color0 default '(|)'
color status green default ''
color status white default ''
color status yellow default ''
color status red default ''
color status green default ' '
color status white default ' '
color status yellow default ' '
color status red default ' '
color tree color15 default

View File

@ -78,6 +78,6 @@ save-path ~/.config/newsboat/saved
macro , open-in-browser
macro d set browser "ytdl"; open-in-browser ; set browser linkhandler
macro v set browser "setsid nohup mpv"; open-in-browser ; set browser linkhandler
macro w set browser "tmux split-window -hp 60 && tmux send-keys '$lynx %u && tmux kill-pane\n'"; open-in-browser ; set browser linkhandler
macro w set browser "tmux split-window -hp 60 && tmux send-keys 'lynx %u && tmux kill-pane\n'"; open-in-browser ; set browser linkhandler
# vim: ft=conf cms=#%s

View File

@ -3,14 +3,18 @@ setlocal shiftwidth=4
setlocal tabstop=4
setlocal foldmethod=syntax
let g:go_textobj_include_function_doc = 1
let g:go_autodetect_gopath = 1
let g:go_imports_autosave = 1
let g:go_doc_popup_window = 1
let g:go_gopls_enabled = 1
let g:go_metalinter_autosave = 1
let g:go_fmt_command = "goimports"
let g:go_list_type = "quickfix"
" Go syntax highlighting
let g:go_highlight_types = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
@ -23,14 +27,12 @@ let g:go_auto_type_info = 1
" Add the failing test name to the output of :GoTest
let g:go_test_show_name = 1
let b:ale_linters = ['gopls']
inoremap <buffer> . .<C-x><C-o>
nmap <buffer><localleader>t :GoTest!<CR>
nmap <buffer><localleader>v :GoVet!<CR>
nmap <buffer><localleader>b :GoBuild!<CR>
nmap <buffer><localleader>i :GoInstall!<CR>
nmap <buffer><localleader>l :GoMetaLinter!<CR>
nmap <buffer><localleader>r :GoRun %<CR>
nmap <buffer><localleader>d :GoDebugStart!<CR>
nmap <buffer><leader>t :GoTest!<CR>
nmap <buffer><leader>b :GoBuild!<CR>
nmap <buffer><leader>i :GoInstall!<CR>
nmap <buffer><leader>R :GoRun %<CR>
nmap <buffer><leader>x :GoDebugStart!<CR>
nmap <buffer><leader>r :GoRun!<CR>
nmap <buffer><leader>d :GoDoc<CR>
nmap <buffer><leader>D :GoDocBrowser<CR>

View File

@ -1,5 +1,3 @@
let b:ale_linters = ['prettier_standard']
let b:ale_fixers = ['prettier_standard']
setlocal path=.,**
setlocal path-=/usr/include
setlocal suffixesadd+=.js

View File

@ -1,2 +0,0 @@
let b:ale_linters = ['prettier']
let b:ale_fixers = ['prettier']

View File

@ -1,2 +0,0 @@
let b:ale_linters = ['prettier_standard']
let b:ale_fixers = ['prettier_standard']

View File

@ -2,10 +2,25 @@ setlocal nonumber norelativenumber laststatus=0 showmode
setlocal signcolumn=no textwidth=80 wrap sw=2
setlocal tabstop=2 noexpandtab softtabstop=0 linebreak
setlocal autoindent ruler colorcolumn=80
setlocal complete+=kspell
setlocal spell spelllang=es,en_us,cjk
setlocal formatoptions&
setlocal formatoptions+=tqnw
setlocal formatlistpat=^\\s*\\(\\d\\+\\\|[a-z]\\)[\\].)]\\s*
setlocal formatoptions=1tqnw
setlocal comments=n:>
setlocal formatlistpat=^\\s* " Optional leading whitespace
setlocal formatlistpat+=[ " Start character class
setlocal formatlistpat+=\\[({]\\? " | Optionally match opening punctuation
setlocal formatlistpat+=\\( " | Start group
setlocal formatlistpat+=[0-9]\\+ " | | Numbers
setlocal formatlistpat+=\\\| " | | or
setlocal formatlistpat+=[a-zA-Z]\\+ " | | Letters
setlocal formatlistpat+=\\) " | End group
setlocal formatlistpat+=[\\]:.)} " | Closing punctuation
setlocal formatlistpat+=] " End character class
setlocal formatlistpat+=\\s\\+ " One or more spaces
setlocal formatlistpat+=\\\| " or
setlocal formatlistpat+=^\\s*[-+*]\\s\\+ " Bullet points
setlocal comments=b:*,b:-
setlocal commentstring=<!--%s-->
" Spellcheck
nnoremap <buffer> <silent> <F7> [s
@ -24,6 +39,3 @@ inoremap <buffer> <silent> <C-d> <esc>:.s/\[\]/\[x\]<Enter>
" Markdown jump to next heading
nnoremap <buffer> <silent> ]] :<C-u>call <SID>dead#functions#JumpToNextHeading("down", v:count1)<CR>
nnoremap <buffer> <silent> [[ :<C-u>call <SID>dead#functions#JumpToNextHeading("up", v:count1)<CR>
let b:ale_linters = ['prettier']
let b:ale_fixers = ['prettier']

View File

@ -3,8 +3,9 @@ setlocal nospell
setlocal nolist
" Close with q
nnoremap <buffer> q :<C-u>close<CR>
nnoremap <silent><buffer> q :<C-u>close<CR>
nnoremap <silent><buffer> dd :call qf#delitem()<Cr>
nnoremap <buffer><silent> <C-j> :<C-u>call <SID>older()<CR>
nnoremap <buffer><silent> <C-k> :<C-u>call <SID>newer()<CR>

View File

@ -1,2 +0,0 @@
let b:ale_linters = ['stylelint']
let b:ale_fixers = ['stylelint']

View File

@ -4,5 +4,12 @@ endif
let b:sh_indent_options['continuation-line'] = 2
let b:ale_linters = ['shellcheck']
let b:ale_fixers = ['shfmt']
" command! -buffer -bang Lint compiler shfmt | lmake<bang>
" command! -buffer -bang Compile compiler shellcheck | make<bang>
" augroup linty
" au! * <buffer>
" au BufWritePre <buffer=abuf> Lint
" au BufWritePost <buffer=abuf> :silent Compile
" au QuickFixCmdPost make cwindow
" augroup END

View File

@ -1,2 +0,0 @@
let b:ale_linters = ['tsserver', 'eslint']
let b:ale_linters = ['prettier_standard']

View File

@ -1 +0,0 @@
" let b:ale_linters = ['vint']

View File

@ -1 +0,0 @@
let b:ale_linters = ['prettier']

View File

@ -1 +1,9 @@
setlocal shiftwidth=2
command! -buffer -bang Compile compiler zsh | make<bang>
augroup linty
au! * <buffer>
au BufWritePost <buffer=abuf> Compile
au QuickFixCmdPost make cwindow
augroup END

View File

@ -1,30 +1,26 @@
if exists('b:coc_enabled=1')
" if exists('b:coc_enabled=1')
set completeopt-=preview
nnoremap <silent><F6> :vsplit<CR><Bar>:CocConfig<CR>
nnoremap <silent><F6> :vsplit<CR><Bar>:CocConfig<CR>
let g:coc_global_extensions = ['coc-highlight', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json', 'coc-emmet']
inoremap <buffer><silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ coc#expandableOrJumpable() ?
\ "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
inoremap <buffer><silent><expr> <C-space> coc#refresh()
let g:coc_global_extensions = ['coc-diagnostic', 'coc-prettier', 'coc-highlight', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json', 'coc-emmet']
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current
" position. Coc only does snippet and additional edit on confirm.
if exists('*complete_info')
inoremap <buffer><expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
else
inoremap <buffer><expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
imap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
endif
" use <c-@>for trigger completion
inoremap <silent><expr> <c-@> coc#refresh()
" Navigate diagnostics
nnoremap <silent> <F7> :<C-u>CocList diagnostics<CR>
nmap <silent> <F8> <Plug>(coc-diagnostic-prev)
nmap <silent> <F9> <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nnoremap <buffer><silent> gd <Plug>(coc-definition)
nnoremap <buffer><silent> gr <Plug>(coc-references)
@ -44,18 +40,16 @@ if exists('b:coc_enabled=1')
nnoremap <buffer><leader>rn <Plug>(coc-rename)
aug Cursor
au!
au CursorHold * silent call CocActionAsync('highlight')
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
au!
" au CursorHold * silent call CocActionAsync('highlight')
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
aug END
else
set omnifunc=syntaxcomplete#Complete
" open omni completion menu closing previous if open and opening new menu without changing the text
inoremap <silent> <expr> <C-Space> (pumvisible() ? (col('.') > 1 ? '<Esc>i<Right>' : '<Esc>i') : '') .
\ '<C-x><C-o><C-r>=pumvisible() ? "\<lt>C-n>\<lt>C-p>\<lt>Down>" : ""<CR>'
" open user completion menu closing previous if open and opening new menu without changing the text
inoremap <silent> <expr> <M-Space> (pumvisible() ? (col('.') > 1 ? '<Esc>i<Right>' : '<Esc>i') : '') .
\ '<C-x><C-u><C-r>=pumvisible() ? "\<lt>C-n>\<lt>C-p>\<lt>Down>" : ""<CR>'
packadd AutoComplPop
endif
" else
" set omnifunc=syntaxcomplete#Complete
" " open omni completion menu closing previous if open and opening new menu without changing the text
" inoremap <silent> <expr> <C-Space> (pumvisible() ? (col('.') > 1 ? '<Esc>i<Right>' : '<Esc>i') : '') .
" \ '<C-x><C-o><C-r>=pumvisible() ? "\<lt>C-n>\<lt>C-p>\<lt>Down>" : ""<CR>'
" " open user completion menu closing previous if open and opening new menu without changing the text
" inoremap <silent> <expr> <M-Space> (pumvisible() ? (col('.') > 1 ? '<Esc>i<Right>' : '<Esc>i') : '') .
" \ '<C-x><C-u><C-r>=pumvisible() ? "\<lt>C-n>\<lt>C-p>\<lt>Down>" : ""<CR>'
" endif

View File

@ -1,10 +1,10 @@
" Stop the vim-jsx plug-in from aggressively blowing away our ftdetection.
"
" Without something like this, our ftdetect/{jest,jsx}.vim config will
" set the filetype in test files to "javascript.jest" or
" "javascript.jest.jsx", but then vim-jsx will come along and unconditionally
" set it to "javascript.jsx", which isn't helpful. Currently I'm not working in
" any projects that use a ".jsx" extension so this workaround is viable
" set the filetype in test files to javascript.jest or
" javascript.jest.jsx, but then vim-jsx will come along and unconditionally
" set it to javascript.jsx, which isn't helpful. Currently I'm not working in
" any projects that use a .jsx extension so this workaround is viable
" (unfortunately, there's no other mechanism for disabling this functionality in
" vim-jsx).
let g:jsx_ext_required=1

View File

@ -1,47 +1,26 @@
function! dead#colores#MyHighlights() abort
highlight Trail ctermbg=red guibg=red
call matchadd('Trail', '\s\+$', 100)
highlight ColorColumn ctermbg=magenta
call matchadd('ColorColumn', '\%81v', 100)
endfunction
function! dead#colores#Maquillaje() abort
highlight! Normal guibg=NONE
highlight! VertSplit ctermbg=NONE ctermfg=0 cterm=NONE guibg=NONE guifg=#080808 gui=NONE
highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE
highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd
highlight! ALEWarningSignLineNr ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl
highlight! ALEErrorSignLineNr ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl
highlight! CocUnderline cterm=undercurl gui=undercurl
highlight! PmenuSel guibg=#111111 guifg=#6699cc
highlight! RedrawDebugClear guibg=#080808
highlight! NvimInternalError guifg=#080808
highlight! DiffAdded guifg=#333333
highlight! PmenuThumb guifg=#333333
highlight! SpellBad ctermfg=203 cterm=underline guifg=#ff5f5f
highlight! RedrawDebugClear guibg=#080808
highlight! NvimInternalError guifg=#080808
highlight! SpellBad ctermfg=203 cterm=underline guifg=#ff5f5f
highlight! link SpellLocal SpellBad
highlight! link SpellRare SpellBad
highlight! link SpellCap SpellBad
highlight! link Folded Comment
highlight! link NonText VertSplit
if &diff
highlight! link DiffText MatchParen
highlight! DiffAdd guibg=#0f111a guifg=#43a047
highlight! DiffChange guibg=#0f111a guifg=#fdd835
highlight! DiffRemoved guibg=#0f111a guifg=#e53935
endif
highlight GitGutterAdd ctermfg=2 guifg=#009900 gui=bold
highlight GitGutterChange ctermfg=3 guifg=#bbbb00 gui=bold
highlight GitGutterDelete ctermfg=1 guifg=#ff2222 gui=bold
endfunction
function! dead#colores#Barra() abort
highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#666666 cterm=none
highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782 cterm=none gui=bold
highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4 cterm=none gui=bold
highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6 cterm=none gui=bold
highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff cterm=none gui=bold
highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34 cterm=none gui=bold
highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a cterm=none gui=bold
highlight User8 ctermfg=NONE ctermbg=NONE guibg=NONE guifg=NONE cterm=NONE
highlight User1 ctermbg=NONE ctermfg=251 cterm=none guibg=NONE guifg=#333333
highlight User2 ctermbg=NONE ctermfg=234 cterm=none guibg=NONE guifg=#c4384b gui=bold
highlight User3 ctermbg=4 ctermfg=234 cterm=none guibg=NONE guifg=#008bb4 gui=bold
highlight User4 ctermbg=251 ctermfg=234 cterm=none guibg=NONE guifg=#C0C0C0 gui=bold
highlight User5 ctermbg=4 ctermfg=234 cterm=none guibg=NONE guifg=#e64eff gui=bold
highlight User6 ctermbg=9 ctermfg=234 cterm=none guibg=NONE guifg=#fbad34 gui=bold
highlight User7 ctermbg=251 ctermfg=234 cterm=none guibg=NONE guifg=#407e4a gui=bold
highlight User8 ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#c4ab39
highlight User9 ctermbg=NONE ctermfg=251 cterm=NONE guibg=NONE guifg=#666666
endfunction

View File

@ -11,12 +11,12 @@ function! dead#functions#Relativize(v) abort
endfunction
function! dead#functions#JumpToNextHeading(direction, count)
let col = col(".")
silent execute a:direction == "up" ? '?^#' : '/^#'
let col = col('.')
silent execute a:direction ==? 'up' ? '?^#' : '/^#'
if a:count > 1
silent execute "normal! " . repeat("n", a:direction == "up" && col != 1 ? a:count : a:count - 1)
silent execute 'normal! ' . repeat('n', a:direction ==? 'up' && col != 1 ? a:count : a:count - 1)
endif
silent execute "normal! " . col . "|"
silent execute 'normal! ' . col . '|'
unlet col
endfunction
@ -27,3 +27,20 @@ function! dead#functions#NewMail()
0r ~/.config/nvim/templates/correo.skeleton | w | $
endfunction
command! Mail call dead#functions#NewMail()
" Ripgrep advanced
function! dead#functions#RipgrepFzf(query, fullscreen)
let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case %s || true'
let initial_command = printf(command_fmt, shellescape(a:query))
let reload_command = printf(command_fmt, '{q}')
let spec = {'options': ['--phony', '--query', a:query, '--bind', 'change:reload:'.reload_command]}
call fzf#vim#grep(initial_command, 1, fzf#vim#with_preview(spec), a:fullscreen)
endfunction
command! -nargs=* -bang RG call dead#functions#RipgrepFzf(<q-args>, <bang>0)
" Git grep
command! -bang -nargs=* GGrep
\ call fzf#vim#grep(
\ 'git grep --line-number '.shellescape(<q-args>), 0,
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)

View File

@ -8,12 +8,12 @@ endfunction
function! dead#statusline#StatusLine() abort
let l:statusline=''
let l:statusline.='%#TabLineFill#%{dead#statusline#LinterStatus()} '
let l:statusline.='%#User6#%{fugitive#head()} '
let l:statusline.='%#User1#%{GitStatus()} '
let l:statusline.='%#User9#%f %m'
let l:statusline.=' %#User8#%{fugitive#head()} '
let l:statusline.='%#User7#%{GitStatus()}'
let l:statusline.='%{dead#statusline#LinePasteMode()}'
let l:statusline.='%= '
let l:statusline.='%#User1#%p%% %l:%c '
let l:statusline.='%#User9#%p%% ☰ %l:%c '
let l:statusline.=dead#statusline#ModeColor()
let l:statusline.=dead#statusline#CurrentMode()
return l:statusline
@ -22,26 +22,21 @@ endfunction
function! dead#statusline#StatusLineNC() abort
let l:statusline=''
let l:statusline.='%#User1#'
let l:statusline.='%= '
let l:statusline.='%f '
let l:statusline.='%m'
let l:statusline.='%='
let l:statusline.='%F'
return l:statusline
endfunction
function! dead#statusline#HelpStatusLine() abort
let l:statusline=''
let l:statusline.='%= '
let l:statusline.='%#User1#'
let l:statusline.='%f'
let l:statusline.='%='
let l:statusline.='%h'
return l:statusline
endfunction
function! dead#statusline#FMStatusLine() abort
let l:statusline=''
let l:statusline.='%#User8#'
let l:statusline.='%= '
let l:statusline.='% '
return l:statusline
endfunction
function! dead#statusline#UpdateInactiveWindows()
for winnum in range(1, winnr('$'))
if winnum != winnr()
@ -60,7 +55,7 @@ function! dead#statusline#LinePasteMode() abort
endfunction
function! dead#statusline#RefreshStatusLine(mode)
if (a:mode == "active" && &filetype !=? 'help')
if (a:mode ==? 'active' && &filetype !=? 'help')
setlocal statusline=%!dead#statusline#StatusLine()
else
setlocal statusline=%!dead#statusline#StatusLineNC()
@ -68,20 +63,6 @@ function! dead#statusline#RefreshStatusLine(mode)
if &filetype ==? 'help'
setlocal statusline=%!dead#statusline#HelpStatusLine()
endif
if &filetype ==? 'Defx'
setlocal statusline=%!dead#statusline#FMStatusLine()
endif
endfunction
function! dead#statusline#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! GitStatus() abort
@ -91,3 +72,25 @@ function! GitStatus() abort
let [ l:added, l:modified, l:removed ] = GitGutterGetHunkSummary()
return printf('+%d ~%d -%d', l:added, l:modified, l:removed)
endfunction
let g:modes={
\ 'n' : ['%3*','NORMAL'],
\ 'no' : ['%3*','OPERATOR PENDING'],
\ 'v' : ['%5*','VISUAL'],
\ 'V' : ['%5*','V·LINE'],
\ '' : ['%5*','V·BLOCK'],
\ 's' : ['%7*','SELECT'],
\ 'S' : ['%7*','S·LINE'],
\ '' : ['%7*','S·BLOCK'],
\ 'i' : ['%4*','INSERT'],
\ 'R' : ['%2*','REPLACE'],
\ 'Rv' : ['%2*','V·REPLACE'],
\ 'c' : ['%6*','COMMAND'],
\ 'cv' : ['%6*','VIM EX'],
\ 'ce' : ['%6*','EX'],
\ 'r' : ['%1*','PROMPT'],
\ 'rm' : ['%1*','MORE'],
\ 'r?' : ['%1*','CONFIRM'],
\ '!' : ['%*1','SHELL'],
\ 't' : ['%*1','TERMINAL'],
\}

View File

@ -1,32 +0,0 @@
scriptencoding utf-8
function! dead#tabline#Tabline() abort
let s = ''
for i in range(tabpagenr('$'))
let tab = i + 1
let winnr = tabpagewinnr(tab)
let buflist = tabpagebuflist(tab)
let bufnr = buflist[winnr - 1]
let bufname = bufname(bufnr)
let bufmodified = getbufvar(bufnr, '&mod')
let s .= '%' . tab . 'T'
let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#')
let s .= ' ' . tab .' '
let s .= (bufname !=? '' ? fnamemodify(bufname, ':f') . ' ' : '[Untitled] ')
if bufmodified
let s .= ' + '
endif
endfor
if &filetype ==? 'Defx'
let s = ''
endif
let s .= '%#TabLineFill#'
if (exists('g:tablineclosebutton'))
let s .= '%=%999XX'
endif
return s
endfunction

View File

@ -1,17 +1,52 @@
{
"coc.preferences.hoverTarget": "float",
"coc.preferences.useQuickfixForLocations": true,
"coc.preferences.bracketEnterImprove": false,
"diagnostic.displayByAle": true,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"html",
"css",
"json",
"jsonc",
"sh"
],
"codeLens.enable": true,
"diagnostic.errorSign": "𝐗",
"diagnostic.warningSign": "➤",
"diagnostic.infoSign": "●",
"diagnostic-languageserver.mergeConfig": true,
"diagnostic-languageserver.filetypes": {
// lint `sh` (includes `bash`) files
"sh": "shellcheck",
"html": "prettier",
"vim": "vint"
},
"diagnostic-languageserver.formatFiletypes": {
// format `sh` (includes `bash`) files using formatter defined below
"sh": "shfmt"
},
"diagnostic-languageserver.formatters": {
// define our formatter so that we can reference it from
// `diagnostic-languageserver.formatFiletypes`
"shfmt": {
"command": "shfmt",
// all the below args are entirely optional
// primarily listed here to call out that flags which take an
// argument (such as `-i <num-spaces>` for specifying indentation)
// should be split into two strings, the flag and then the value
"args": ["-p", "-ci", "-sr"]
}
},
"list.alignColumns": true,
"suggest.echodocSupport": true,
"suggest.maxPreviewWidth": 100,
"suggest.noselect": false,
"suggest.removeDuplicateItems": true,
"session.saveOnVimLeave": false,
"snippets.ultisnips.enable": true,
"snippets.loadFromExtensions": true,
"snippets.extends": {
"javascriptreact": ["javascript"],
"typescript": ["javascript"]
},
"tailwindCSS.enable": true,
"tailwindCSS.validate": true,
"tailwindCSS.emmetCompletions": true,
"tailwindCSS.lint.cssConflict": "warning",
"tsserver.npm": "/home/deadguy/.config/yarn/bin/yarn",
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,

View File

@ -42,7 +42,7 @@ let s:bright_white = ['#FCE8C3', 15]
" xterm colors.
let s:orange = ['#FF5F00', 202]
let s:bright_orange = ['#FF8700', 208]
let s:hard_black = ['#121212', 233]
let s:hard_black = ['#080808', 233]
let s:xgray1 = ['#262626', 235]
let s:xgray2 = ['#303030', 236]
let s:xgray3 = ['#3A3A3A', 237]
@ -79,6 +79,10 @@ if !exists('g:srcery_underline')
let g:srcery_underline=1
endif
if !exists('g:srcery_underline_match_paren')
let g:srcery_underline_match_paren=1
endif
if !exists('g:srcery_inverse')
let g:srcery_inverse=1
endif
@ -173,11 +177,15 @@ call s:HL('SrceryCyan', s:cyan)
call s:HL('SrceryBlack', s:black)
call s:HL('SrceryRedBold', s:red, s:none, s:bold)
call s:HL('SrceryRedItalic', s:red, s:none, s:italic)
call s:HL('SrceryGreenBold', s:green, s:none, s:bold)
call s:HL('SrceryYellowBold', s:yellow, s:none, s:bold)
call s:HL('SrceryBlueBold', s:blue, s:none, s:bold)
call s:HL('SrceryMagentaBold', s:magenta, s:none, s:bold)
call s:HL('SrceryCyanBold', s:cyan, s:none, s:bold)
call s:HL('SrceryCyanItalic', s:cyan, s:none, s:italic)
call s:HL('SrceryBrightMagenta', s:bright_magenta, s:none, s:italic)
call s:HL('SrceryBrightBlue', s:bright_blue, s:none, s:italic)
call s:HL('SrceryBrightRed', s:bright_red, s:none)
call s:HL('SrceryBrightGreen', s:bright_green, s:none)
@ -192,7 +200,9 @@ call s:HL('SrceryBrightWhite', s:bright_white)
call s:HL('SrceryOrange', s:orange)
call s:HL('SrceryBrightOrange', s:bright_orange)
call s:HL('SrceryOrangeBold', s:orange, s:none, s:bold)
call s:HL('SrceryOrangeItalic', s:orange, s:none, s:italic)
call s:HL('SrceryHardBlack', s:hard_black)
call s:HL('SrceryXgray4Italic', s:xgray4, s:none, s:italic)
call s:HL('SrceryXgray1', s:xgray1)
call s:HL('SrceryXgray2', s:xgray2)
call s:HL('SrceryXgray3', s:xgray3)
@ -302,6 +312,10 @@ if v:version >= 700
endif
endif
if g:srcery_underline_match_paren == 1
call s:HL('MatchParen', s:bright_magenta, s:none, s:underline)
endif
if v:version >= 703
" Highlighted screen columns
call s:HL('ColorColumn', s:none, s:xgray2)
@ -311,7 +325,7 @@ if v:version >= 703
" Line number of CursorLine
if g:srcery_transparent_background == 1 && !has('gui_running')
call s:HL('CursorLineNr', s:yellow, s:none)
call s:HL('CursorLineNr', s:yellow, s:none, s:bold)
else
call s:HL('CursorLineNr', s:yellow, s:black)
endif
@ -345,7 +359,7 @@ if g:srcery_transparent_background == 1 && !has('gui_running')
call s:HL('StatusLineNC', s:bright_black, s:none, s:underline)
" The column separating vertically split windows
call s:HL('VertSplit', s:bright_white, s:none)
call s:HL('VertSplit', s:hard_black, s:none)
" Current match in wildmenu completion
call s:HL('WildMenu', s:blue, s:none, s:bold)
@ -376,7 +390,7 @@ hi! link WarningMsg SrceryRedBold
" Gutter: {{{
" Line number for :number and :# commands
call s:HL('LineNr', s:bright_black)
call s:HL('LineNr', s:xgray2)
if g:srcery_transparent_background == 1 && !has('gui_running')
" Column where signs are displayed
@ -438,7 +452,7 @@ hi! link Operator Normal
hi! link Keyword SrceryRed
" Variable name
hi! link Identifier SrceryCyan
hi! link Identifier SrceryCyanItalic
" Function name
hi! link Function SrceryYellow
@ -454,7 +468,7 @@ hi! link Macro SrceryOrange
hi! link PreCondit SrceryCyan
" Generic constant
hi! link Constant SrceryBrightMagenta
hi! link Constant SrceryBrightMagentaItalic
" Character constant: 'c', '/n'
hi! link Character SrceryBrightMagenta
" Boolean constant: TRUE, false
@ -465,11 +479,11 @@ hi! link Number SrceryBrightMagenta
hi! link Float SrceryBrightMagenta
" Generic type
hi! link Type SrceryBrightBlue
hi! link Type SrceryBrightBlueItalic
" static, register, volatile, etc
hi! link StorageClass SrceryOrange
hi! link StorageClass SrceryOrangeItalic
" struct, union, enum, etc.
hi! link Structure SrceryCyan
hi! link Structure SrceryCyanItalic
" typedef
hi! link Typedef SrceryMagenta
@ -484,9 +498,9 @@ endif
if v:version >= 700
" Popup menu: normal item
call s:HL('Pmenu', s:bright_white, s:xgray2)
call s:HL('Pmenu', s:white, s:xgray1)
" Popup menu: selected item
call s:HL('PmenuSel', s:bright_white, s:magenta, s:bold)
call s:HL('PmenuSel', s:black, s:blue, s:bold)
if g:srcery_transparent_background == 1 && !has('gui_running')
" Popup menu: scrollbar
@ -505,6 +519,7 @@ endif
if g:srcery_transparent_background == 1 && !has('gui_running')
call s:HL('DiffDelete', s:red, s:none)
call s:HL('DiffAdd', s:green, s:none)
call s:HL('DiffAdded', s:xgray1, s:none)
call s:HL('DiffChange', s:cyan, s:none)
call s:HL('DiffText', s:yellow, s:none)
else
@ -662,6 +677,7 @@ call s:HL('CocErrorHighlight', s:none, s:none, s:undercurl, s:red)
call s:HL('CocWarningHighlight', s:none, s:none, s:undercurl, s:bright_orange)
call s:HL('CocInfoHighlight', s:none, s:none, s:undercurl, s:yellow)
call s:HL('CocHintHighlight', s:none, s:none, s:undercurl, s:blue)
call s:HL('CocUnderline', s:none, s:none, s:undercurl, s:white)
" }}}
" CtrlP: "{{{

View File

@ -1,2 +0,0 @@
setlocal noexpandtab
setlocal nolist

View File

@ -20,10 +20,12 @@ setlocal nonumber
setlocal noruler
setlocal colorcolumn=0
setlocal signcolumn=no
" setlocal statusline=
wincmd L
" Quick close
nnoremap <silent><buffer> q :helpclose<CR>
" Jump to links with enter
nmap <buffer> <CR> <C-]>

View File

@ -1,9 +1,12 @@
" The virgin plugin vs the chad local options
setlocal nonumber norelativenumber laststatus=0 showmode
setlocal signcolumn=no textwidth=80 wrap sw=2
setlocal tabstop=2 expandtab softtabstop=2 linebreak
setlocal autoindent noruler colorcolumn=80
setlocal spell spelllang=es_AR,en_us
setlocal tabstop=2 noexpandtab softtabstop=0 linebreak
setlocal autoindent ruler colorcolumn=80
setlocal complete+=kspell
setlocal spell spelllang=es,en_us
setlocal formatoptions&
setlocal formatoptions+=tqnw
setlocal formatlistpat=^\\s*\\(\\d\\+\\\|[a-z]\\)[\\].)]\\s*
function! s:OnExit(job_id, code, event) dict
if a:code == 0
@ -43,11 +46,14 @@ function! s:SendMail()
startinsert
endfunction
nnoremap <buffer> <F7> [s
nnoremap <buffer> <F8> ]s
nnoremap <buffer> <F9> z=
nnoremap <buffer> <F10> zg
" Spellcheck
nnoremap <buffer> <silent> <F7> [s
nnoremap <buffer> <silent> <F8> ]s
nnoremap <buffer> <silent> <F9> z=
nnoremap <buffer> <silent> <F10> z=1<CR><CR>
nnoremap <buffer> <silent> <F11> 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:

View File

@ -6,7 +6,7 @@ endif
if filereadable('~/.local/share/npm/bin/neovim-node-host')
let g:node_host_prog = '~/.local/share/npm/bin/neovim-node-host'
endif
if executable("rg")
if executable('rg')
set grepprg=rg\ --vimgrep
set grepformat=%f:%l:%c:%m
endif
@ -28,23 +28,22 @@ aug colores
au!
au ColorScheme * call dead#colores#Barra()
au ColorScheme * call dead#colores#Maquillaje()
au ColorScheme * call dead#colores#MyHighlights()
aug END
let g:srcery_transparent_background = 1
let g:srcery_italic = 1
let g:srcery_inverse_matches = 1
let g:srcery_underline = 1
let g:srcery_underline_match_paren = 1
let g:srcery_undercurl = 1
colorscheme srcery
if filereadable(expand("~/.local/share/nvim/site/autoload/plug.vim"))
if filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim'))
call plug#begin(stdpath('data') . '/plugged')
Plug 'dense-analysis/ale'
Plug 'lervag/vimtex', {'for': 'latex'}
Plug 'neoclide/coc.nvim', {'branch': 'release', 'for': ['javascript', 'html', 'css', 'json', 'typescript', 'jsx', 'tsx']}
Plug 'neoclide/coc.nvim', {'branch': 'release', 'for': ['javascript', 'html', 'css', 'json', 'jsonc', 'typescript', 'jsx', 'tsx', 'sh', 'vim']}
Plug 'fatih/vim-go', {'for': 'go', 'do': ':GoInstallBinaries'}
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/fzf.vim'
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
call plug#end()
endif

View File

@ -1,24 +0,0 @@
let g:ale_lint_delay = 0
let g:ale_disable_lsp = 1
let g:ale_fix_on_save = 1
let g:ale_linters_explicit = 1
let g:ale_use_global_executables = 1
let g:ale_close_preview_on_insert = 1
let g:ale_sign_highlight_linenrs = 1
let g:ale_echo_cursor = 0
let g:ale_virtualtext_cursor = 1
let g:ale_set_highlights = 1
let g:ale_set_signs = 1
let g:ale_javascript_eslint_suppress_missing_config = 1
let g:ale_sign_error = '𝐗'
let g:ale_sign_warning = '➤'
let g:ale_sign_info = '●'
let g:ale_loclist_msg_format = '[%linter%] %s% (code)% [%severity%]'
let g:ale_linter_aliases = { 'jsx': ['css', 'javascript'] }
let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'] }
let g:ale_pattern_options = {
\ '\.min\.js$': {'ale_linters': [], 'ale_fixers': []},
\ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []},
\}
nmap <silent> <F7> <Plug>(ale_previous_wrap)
nmap <silent> <F8> <Plug>(ale_next_wrap)

View File

@ -7,15 +7,13 @@ if !exists('autocommands_loaded') && has('autocmd')
aug OnInsert
au BufWinEnter,FocusGained,InsertLeave,WinEnter * call dead#functions#Relativize(1)
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call dead#functions#Relativize(0)
au InsertLeave * setlocal nopaste
au InsertEnter * setlocal relativenumber
au InsertLeave * setlocal nopaste norelativenumber
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
aug END
aug FileTypes
au BufNewFile ~/doc/blog/*.md 0r ~/.config/nvim/templates/wiki.skeleton
au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
au BufNewFile,BufRead requirements*.txt set syntax=python
au FileType fzf tnoremap <buffer> <esc> <c-c>
au BufRead,BufNewFile /tmp/neomutt* set filetype=mail
aug END
@ -35,10 +33,10 @@ if !exists('autocommands_loaded') && has('autocmd')
aug MyTerminal
au TermOpen * setlocal wrap nonumber norelativenumber noruler signcolumn=no
au TermOpen * set laststatus=0 showtabline=0
au TermOpen * set laststatus=0
" workaround for a segfault: https://github.com/neovim/neovim/issues/11548#issuecomment-583081783
" immediately enter insert mode when switching to a terminal
au BufEnter term://* startinsert!
au TermClose * set laststatus=2 showtabline=2
au TermClose * set laststatus=2
aug END
endif

View File

@ -1,80 +1,8 @@
let g:netrw_dirhistmax=0
let g:netrw_banner = 0
let g:netrw_liststyle= 3
nnoremap <silent> <F5> :Vex!<CR>
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
aug defx_things
au!
" Close defx if it's the only buffer left in the window
au WinEnter * if &ft == 'defx' && winnr('$') == 1 | q | endif
" Move focus to the next window if current buffer is defx
au TabLeave * if &ft == 'defx' | wincmd w | endif
au FileType defx do WinEnter | call s:defx_my_settings()
aug END
call defx#custom#option('_', {
\ 'columns': 'mark:indent:git:icon:filename:type',
\ 'winwidth': 30,
\ 'buffer_name': '',
\ 'split': 'vertical',
\ 'direction': 'topleft',
\ 'show_ignored_files': 0,
\ 'toggle': 1,
\ 'resume': 1
\ })
call defx#custom#column('icon', {
\ 'directory_icon': '▷',
\ 'opened_icon': '▼',
\ 'root_icon': '~',
\ })
call defx#custom#column('mark', {
\ 'readonly_icon': '',
\ 'selected_icon': '',
\ })
function! s:defx_my_settings() abort
setl nonumber
setl norelativenumber
setl listchars=
setl nofoldenable
setl foldmethod=manual
nnoremap <silent><buffer><expr> o defx#do_action('open_tree', 'toggle')
nnoremap <silent><buffer><expr> l defx#do_action('open_tree')
nnoremap <silent><buffer><expr> h defx#do_action('close_tree')
nnoremap <silent><buffer><expr> <CR> defx#do_action('multi', ['drop', 'quit'])
nnoremap <silent><buffer><expr> <C-v> defx#do_action('multi', [['open', 'botright vsplit'], 'quit'])
nnoremap <silent><buffer><expr> <C-x> defx#do_action('multi', [['open', 'botright split'], 'quit'])
nnoremap <silent><buffer><expr> t defx#do_action('multi', [['drop', 'tabnew'], 'quit'])
nnoremap <silent><buffer><expr> D defx#do_action('new_directory')
nnoremap <silent><buffer><expr> F defx#do_action('new_multiple_files')
nnoremap <silent><buffer><expr> dd defx#do_action('remove')
nnoremap <silent><buffer><expr> r defx#do_action('rename')
nnoremap <silent><buffer><expr> x defx#do_action('execute_system')
nnoremap <silent><buffer><expr> . defx#do_action('toggle_ignored_files')
nnoremap <silent><buffer><expr> y defx#do_action('yank_path')
nnoremap <silent><buffer><expr> <BS> defx#do_action('cd', ['..'])
nnoremap <silent><buffer><expr> ~ defx#async_action('cd')
nnoremap <silent><buffer><expr> q defx#do_action('quit')
nnoremap <silent><buffer><expr> ' defx#do_action('toggle_select') . 'j'
nnoremap <silent><buffer><expr> * defx#do_action('toggle_select_all')
nnoremap <silent><buffer><expr> <C-r> defx#do_action('redraw')
nnoremap <silent><buffer><expr> S defx#do_action('toggle_sort', 'Time')
nnoremap <silent><buffer><expr> cd defx#do_action('change_vim_cwd')
nnoremap <silent><buffer><expr><nowait> / defx#do_action('cd', getcwd())
nnoremap <silent><buffer><expr><nowait> c defx#do_action('copy')
nnoremap <silent><buffer><expr><nowait> m defx#do_action('move')
nnoremap <silent><buffer><expr><nowait> p defx#do_action('paste')
nnoremap <silent><buffer><expr> j
\ line('.') == line('$') ? 'gg' : 'j'
nnoremap <silent><buffer><expr> k
\ line('.') == 1 ? 'G' : 'k'
endfunction
nnoremap <silent> <F5> :Defx -toggle<CR>
" let g:fzf_layout = { 'window': { 'width': 1.0, 'height': 0.9 } }
let g:fzf_layout = { 'window': { 'width': 1.0, 'height': 0.7, 'yoffset': 1.0, 'border': 'top' } }
let g:fzf_preview_window = ['right:60%', 'ctrl-/']

View File

@ -1,8 +1,8 @@
let g:gitgutter_enabled = 0
let g:gitgutter_realtime = 0
let g:gitgutter_eager = 0
let g:gitgutter_enabled = 1
let g:gitgutter_terminal_reports_focus=0
let g:gitgutter_map_keys = 0
let g:gitgutter_highlight_linenrs = 1
let g:gitgutter_set_sign_backgrounds = 1
let g:gitgutter_grep = 'rg --color=never'
let g:fugitive_summary_format = "%an\t%s"

View File

@ -1,4 +1,3 @@
let g:tex_flavor='latex'
let g:Tex_DefaultTargetFormat ='pdf'
let g:vimtex_compiler_progname = 'nvr'
let g:vimtex_view_method = 'zathura'
@ -8,3 +7,10 @@ let g:vimtex_complete_enable = 1
let g:vimtex_view_use_temp_files = 2
set conceallevel=1
let g:tex_conceal='abdmg'
let g:vimtex_log_ignore = [
\ 'Underfull',
\ 'Overfull',
\ 'specifier changed to',
\ 'Token not allowed in a PDF string',
\ ]

View File

@ -2,5 +2,5 @@ nnoremap <silent> <F1> :Helptags<CR>
nnoremap <silent> <F2> :Files <C-r>=expand("%:h")<CR>/<CR>
nnoremap <silent> <F3> :Files<CR>
nnoremap <silent> <F4> :Buffers<CR>
nnoremap <silent> <M-f> :Rg<CR>
nnoremap <silent> <M-f> RG<CR>
nnoremap <silent> <M-g> :Commits<CR>

View File

@ -6,6 +6,7 @@ nmap {c <Plug>(GitGutterPrevHunk)
nmap }c <Plug>(GitGutterNextHunk)
nnoremap <silent> <Leader>ff :G<CR>
nnoremap <silent> <Leader>fc :GCheckout<CR>
nnoremap <silent> <Leader>fd :Gvdiffsplit!<CR>
nnoremap <silent> <Leader>fh :diffget //2<CR>
nnoremap <silent> <Leader>fl :diffget //3<CR>

View File

@ -6,12 +6,12 @@ inoremap <c-u> <c-g>u<c-u>
inoremap <c-w> <c-g>u<c-w>
" Navigate the complete menu items like CTRL+n / CTRL+p would.
inoremap <expr> <Down> pumvisible() ? "<C-n>" :"<Down>"
inoremap <expr> <Up> pumvisible() ? "<C-p>" : "<Up>"
" inoremap <expr> <Down> pumvisible() ? "<C-n>" :"<Down>"
" inoremap <expr> <Up> pumvisible() ? "<C-p>" : "<Up>"
" Select the complete menu item like CTRL+y would.
inoremap <expr> <Right> pumvisible() ? "<C-y>" : "<Right>"
inoremap <expr> <CR> pumvisible() ? "<C-y>" :"<CR>"
" inoremap <expr> <Right> pumvisible() ? "<C-y>" : "<Right>"
" inoremap <expr> <CR> pumvisible() ? "<C-y>" :"<CR>"
" Cancel the complete menu item like CTRL+e would.
inoremap <expr> <Left> pumvisible() ? "<C-e>" : "<Left>"

View File

@ -22,8 +22,8 @@ nnoremap <silent> <S-Up> <C-W>K
nnoremap <silent> <S-Down> <C-W>J
" Resize splits
nnoremap <silent> <Left> :vertical resize -2<CR>
nnoremap <silent> <Right> :vertical resize +2<CR>
nnoremap <silent> <Left> :vertical resize -1<CR>
nnoremap <silent> <Right> :vertical resize +1<CR>
nnoremap <silent> <Up> :resize -1<CR>
nnoremap <silent> <Down> :resize +1<CR>
@ -33,13 +33,14 @@ nnoremap <M-k> <C-W><C-K>
nnoremap <M-l> <C-W><C-L>
nnoremap <M-h> <C-W><C-H>
" Gotta Go Fast (save, buffers, quit, messages, newlines, SOF, EOF)
" Gotta Go Fast (save, buffers, quit, messages, indent, SOF, EOF)
nnoremap <silent> <leader>g :w!<CR>
nnoremap <silent> <leader>b :ls<CR>:b<space>
nnoremap <silent> <leader>c :close<CR>
nnoremap <silent> <leader>q :q!<CR>
nnoremap <silent> <leader>Q :qa!<CR>
nnoremap <silent> <leader>m :messages<CR>
nnoremap <silent> <leader>= gg=G<CR>
nnoremap <Bar> gg
nnoremap ¿ G

View File

@ -6,16 +6,12 @@ set clipboard^=unnamedplus
set number
set noshowmode
set noshowcmd
set showtabline=2
set showtabline=0
set noswapfile
set hidden
set lazyredraw
set showmatch
set matchpairs+=<:>
set cpoptions-=m
set nojoinspaces
set updatetime=100
set synmaxcol=200
set splitbelow
set splitright
set notimeout
@ -26,29 +22,21 @@ set shortmess+=aoIOWsc
set foldmethod=marker
set foldclose=all
set foldlevelstart=10
set selectmode=key
set keymodel=startsel
set tabstop=2
set shiftwidth=2
set softtabstop=2
set shiftround
set linebreak
set breakindent
set nosmarttab
set title
set redrawtime=500
set ttimeoutlen=10
set nowritebackup
set undofile
set undolevels=1000
set undoreload=10000
set nrformats+=alpha
set complete+=kspell
set completeopt=menu,menuone,noinsert,noselect
set listchars+=precedes:<,extends:>
set diffopt+=algorithm:histogram,indent-heuristic
set diffopt+=foldcolumn:0
set diffopt+=vertical
set fillchars=diff:\ ,eob:\ ,stlnc:\ ,stl:\ ,vert:\│
set formatoptions+=nl
set formatoptions+=n
set formatoptions-=crot
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'

View File

@ -1,23 +0,0 @@
scriptencoding utf-8
let g:modes={
\ 'n' : ['%3*','NORMAL'],
\ 'no' : ['%3*','N·OPERATOR PENDING'],
\ 'v' : ['%5*','VISUAL'],
\ 'V' : ['%5*','V·LINE'],
\ '' : ['%5*','V·BLOCK'],
\ 's' : ['%7*','SELECT'],
\ 'S' : ['%7*','S·LINE'],
\ '' : ['%7*','S·BLOCK'],
\ 'i' : ['%4*','INSERT'],
\ 'R' : ['%2*','REPLACE'],
\ 'Rv' : ['%2*','V·REPLACE'],
\ 'c' : ['%6*','COMMAND'],
\ 'cv' : ['%6*','VIM EX'],
\ 'ce' : ['%6*','EX'],
\ 'r' : ['%1*','PROMPT'],
\ 'rm' : ['%1*','MORE'],
\ 'r?' : ['%1*','CONFIRM'],
\ '!' : ['%*1','SHELL'],
\ 't' : ['%*1','TERMINAL']
\}

View File

@ -1 +0,0 @@
set tabline=%!dead#tabline#Tabline()

View File

@ -54,8 +54,8 @@ super + ctrl + {d,p}
super + {_,shift} + g
{grabar,corte}
super + {z,x,v,c}
$TERMINAL {_,--class=flota,--class=flota -e pulsemixer,--class=flota -e nvim +Mail +1bw +startinsert}
super + {z,x,v,c,i}
$TERMINAL {_,--class=flota,--class=flota -e pulsemixer,--class=flota -e nvim +Mail +1bw +startinsert,-e irk}
super + {F1,F2,F3}
{fecha,tapa,notifocus}

View File

@ -1,13 +1,15 @@
set adjust-open "best-fit"
set pages-per-row 1
set scroll-full-overlap 0.01
set scroll-page-aware "true"
set scroll-step 100
set selection-clipboard clipboard
set scroll-page-aware "true"
set window-title-basename "true"
set window-title-home-tilde "true"
set statusbar-basename "true"
set statusbar-home-tilde "true"
set zoom-center "true"
set render-loading "false"
map r reload
map R rotate

View File

@ -6,7 +6,8 @@ alias \
z='zathura' \
b='bombadillo' \
g='git' \
se='sudoedit' \
vv='vi' \
se='doas vi' \
am='alsamixer -c 1' \
pm='pulsemixer' \
nb='newsboat -q' \
@ -14,7 +15,6 @@ alias \
ttx='txtnish timeline' \
ytv='straw-viewer' \
vdf='nvim -d' \
irc='catgirl' \
play='mpd && ncmpcpp' \
pyserv='python -m http.server'
@ -22,7 +22,7 @@ alias \
alias \
xk='xbps-query' \
deps='xbps-query -vRx' \
upa='sudo xi' \
upa='doas xi' \
revdeps='xbps-query -vRX' \
xp='xpkg -m > ~/doc/xbpaketes'
@ -41,7 +41,7 @@ alias \
alias \
lxs='tlmgr search --global' \
lxl='tlmgr search' \
lxi='sudo tlmgr install'
lxi='doas tlmgr install'
# Transmission
alias \
@ -78,7 +78,7 @@ alias \
ls='ls -AFt --color=always --group-directories-first' \
grep='grep --color=tty -d skip' \
dmesg='dmesg --color=always' \
vsv='sudo vsv -c yes' \
vsv='doas vsv -c yes' \
ip='ip -c' \
# Con opciones por defecto
@ -93,13 +93,12 @@ alias \
dd='dd status=progress' \
dfc='dfc -dmT' \
wget="wget --no-hsts"
slrn='slrn -i ~/.config/slrn/rc -f ~/.config/slrn/jnewsrc.club --create'
# Comandos
alias \
sudo='sudo ' \
reboot='sudo reboot' \
shutdown='sudo shutdown -h now' \
sudo='doas ' \
reboot='doas reboot' \
shutdown='doas shutdown -h now' \
path='echo -e ${PATH//:/\\n}' \
wp='sxiv-rifle ~/img/wallpaper >/dev/null 2>&1' \
pwn='chmod +x' \

View File

@ -2,9 +2,16 @@ foreach plugin (
zsh-autopair/autopair.plugin.zsh
zsh-system-clipboard/zsh-system-clipboard.plugin.zsh
zsh-history-substring-search/zsh-history-substring-search.plugin.zsh
forgit/forgit.plugin.zsh
) {
source $ZDOTDIR/conf/$plugin
}
FORGIT_COPY_CMD='xclip -selection clipboard'
FORGIT_LOG_FZF_OPTS='
--bind="ctrl-e:execute(echo {} |grep -Eo [a-f0-9]+ |head -1 |xargs git show |vim -)"
'
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
typeset -g ZSH_SYSTEM_CLIPBOARD_TMUX_SUPPORT='true'

View File

@ -20,11 +20,9 @@ mail= :\
trash= :\
Trash= :\
bin= :\
hexagons= :\
hexagons= :\
xresources= :\
xinitrc= :\
.Xdefaults= :\
.Xresources= :\
.bashprofile= :\
.zprofile= :\
.bashrc= :\
@ -38,16 +36,12 @@ xinitrc= :\
gitignore= :\
.jack-settings= :\
.mime.types= :\
.nvidia-settings-rc= :\
.pam_environment= :\
.profile= :\
.recently-used= :\
.selected_editor= :\
.vimrc= :\
.xinputrc= :\
.xserverrc= :\
config= :\
dropbox= :\
exact-match-case-sensitive-1.txt=X1:\
exact-match-case-sensitive-2=X2:\
favicon.ico= :\
@ -64,17 +58,15 @@ node_modules= :\
procfile= :\
react.jsx= :\
user-dirs.dirs= :\
Makefile= :\
Makefile= :\
TODO= :\
LICENSE= :\
COPYING= :\
*.vim= :\
*.dmg= :\
*.tlf= :\
*.flf= :\
*.toml= :\
*.m3u= :\
*.pls= :\
*.m3u= :\
*.pls= :\
*.woff=𝑾:\
*.woff2=𝑾:\
*.eot=𝑬:\
@ -86,7 +78,6 @@ COPYING= :\
*.doc= :\
*.docx= :\
*.webp= :\
*.aseprite= :\
*.bib=﬜ :\
*.7z= :\
*.ai= :\

View File

@ -40,6 +40,17 @@ tmux_sessions() {
: # Start terminal normally
fi
}
if [[ -z $TMUX ]]; then
tmux_base_session(){
client_cnt="$(tmux list-clients | wc -l 2>/dev/null)"
if [[ $client_cnt -eq 0 ]]; then
tmux new-session -d -s z
tmux attach-session -t z
else
tmux_sessions
fi
}
if [[ -z $TMUX ]]; then
tmux_base_session
fi

View File

@ -1,4 +1,4 @@
#!/bin/sh
cd ~/.local/bin || exit
fd -c always -t f -d 1 | fzf -m --cycle --preview='bat --color=always {}' --height='45%' | xargs -r "$EDITOR"
fd -c always -t f -d 1 | fzf +m --cycle --preview-window=right:90%:wrap --preview='bat --color=always {}' --height='45%' | xargs -r "$EDITOR"

View File

@ -1,19 +1,19 @@
#!/bin/sh
send_notification() {
icon="$HOME/.local/share/icons/Marwaita-Dark/24x24/actions/contrast.svg"
dunstify -i "$icon" -r 5555 -u low " $(printf %.0f%% "$(xbacklight -get)")"
icon="$XDG_DATA_HOME/icons/Haiku/scalable/status/dialog-information.svg"
dunstify -i "$icon" -r 5555 -u low " $(printf %.0f%% "$(xbacklight -get)")"
}
case $1 in
up)
# increase the backlight by 5%
xbacklight -inc 5
send_notification
;;
down)
# decrease the backlight by 5%
xbacklight -dec 5
send_notification
;;
up)
# increase the backlight by 5%
xbacklight -inc 5
send_notification
;;
down)
# decrease the backlight by 5%
xbacklight -dec 5
send_notification
;;
esac

View File

@ -4,12 +4,14 @@ NUM=$(bspc query -M --names | awk 'END {print NR}')
if [ "$NUM" = 1 ]; then
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
bspc config top_padding 0
bspc config bottom_padding 0
bspc config single_monocle true
bspc config borderless_monocle true
bspc config top_padding 0
bspc config bottom_padding 0
bspc config single_monocle true
bspc config borderless_monocle true
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
bspc rule -a Firefox:Navigator state=tiled desktop='^2'
hsetroot -solid #080808
hsetroot -solid "#080808"
elif [ "$NUM" = 2 ]; then
pri=$(bspc query -M --names | awk NR==1)
sec=$(bspc query -M --names | awk NR==2)
@ -19,8 +21,10 @@ elif [ "$NUM" = 2 ]; then
bspc config -m "$pri" bottom_padding 0
bspc config -m "$sec" top_padding 3
bspc config -m "$sec" bottom_padding 23
bspc config single_monocle false
bspc config borderless_monocle false
bspc config single_monocle false
bspc config borderless_monocle false
bspc config remove_unplugged_monitors false
bspc config remove_disabled_monitors false
bspc rule -a Firefox:Navigator state=tiled desktop='^6'
randbg &
fi

View File

@ -1,5 +1,7 @@
#!/bin/sh
notify-send -u critical -i ~/img/.icn/control.png "Limpieza Mensual" "Es hora de vaciar el cache" &
ICON="$XDG_DATA_HOME/icons/Haiku/scalable/actions/process-stop.svg"
notify-send -u critical -i "$ICON" "Limpieza Mensual" "Es hora de vaciar el cache" &
sleep 10s
alacritty --class=flota -e sudo xbps-remove -vO

View File

@ -1,18 +1,21 @@
#!/bin/sh
ICON_OK="$XDG_DATA_HOME/icons/Haiku/scalable/mimetypes/gnome-mime-video.svg"
ICON_I="$XDG_DATA_HOME/icons/Haiku/scalable/emblems/emblem-important.svg"
if [ -f "/tmp/blaze-pid" ]; then
recpid="$(cat /tmp/blaze-pid)"
# kill with SIGTERM, allowing finishing touches.
kill -15 "$recpid"
rm -f /tmp/blaze-pid
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
(
sleep 3
kill -9 "$recpid"
) >/dev/null 2>&1 &
notify-send -t 5000 "Grabación Terminada"
exit
recpid="$(cat /tmp/blaze-pid)"
# kill with SIGTERM, allowing finishing touches.
kill -15 "$recpid"
rm -f /tmp/blaze-pid
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
(
sleep 3
kill -9 "$recpid"
) > /dev/null 2>&1 &
notify-send -t 5000 -i "$ICON_OK" "Grabación Terminada"
exit
else
notify-send -t 5000 "Grabación inactiva"
exit 1
notify-send -t 5000 -i "$ICON_I" "Grabación inactiva"
exit 1
fi

View File

@ -50,7 +50,7 @@ articulo() {
fi
}
abrir() { ${TERMINAL:-alacritty} --class=flota -e nvim "$@"; }
abrir() { ${TERMINAL:-alacritty} --class=flota -e "$EDITOR" "$@"; }
listar() { rofi -dmenu "$@"; }

View File

@ -1,3 +1,4 @@
#!/bin/sh
notify-send -u low -t 5000 -i ~/img/.icn/calendar.png "$(date +'%A %d de %B %H:%M')"
ICON="$XDG_DATA_HOME/icons/Haiku/scalable/apps/evolution-calendar.svg"
notify-send -u low -t 5000 -i "$ICON" "$(date +'%A %d de %B %H:%M')"

View File

@ -4,6 +4,9 @@
# https://github.com/cherrry9/blaze/
# modificado por deadguy
ICON_NO="$XDG_DATA_HOME/icons/Haiku/scalable/actions/process-stop.svg"
ICON_RECORD="$XDG_DATA_HOME/icons/Haiku/scalable/devices/gnome-dev-camera.svg"
output="$HOME/vid/Screen/$(date '+%F_%H_%M').mp4"
fps=60
m() { rofi -dmenu -i -no-custom "$@"; }
@ -11,78 +14,78 @@ m() { rofi -dmenu -i -no-custom "$@"; }
method="$(printf "Pantalla\nSelección" | m -p " ")"
if [ "$method" = "Pantalla" ]; then
# get information about the display
monitors="$(xrandr --listmonitors | awk 'NR>1 { printf $NF"\n" }')"
# get information about the display
monitors="$(xrandr --listmonitors | awk 'NR>1 { printf $NF"\n" }')"
# if there's only one display, use that and skip asking
if [ "$(printf "%b\n" "$monitors" | wc -l)" = 1 ]; then
display="$monitors"
else # if there are other displays ask the user which one to use
[ ! "$display" ] && display="$(printf "%b" "$monitors" | m -p "Pantalla")"
fi
# if there's only one display, use that and skip asking
if [ "$(printf "%b\n" "$monitors" | wc -l)" = 1 ]; then
display="$monitors"
else # if there are other displays ask the user which one to use
[ ! "$display" ] && display="$(printf "%b" "$monitors" | m -p "Pantalla")"
fi
set -- $(xrandr -q | grep "$display" | grep -oP '\d*x\d*\+\d*\+\d*' | tr '+x' ' ')
set -- $(xrandr -q | grep "$display" | grep -oP '\d*x\d*\+\d*\+\d*' | tr '+x' ' ')
width="$1"
height="$2"
offX="$3"
offY="$4"
width="$1"
height="$2"
offX="$3"
offY="$4"
sonido="$(printf "Sí\nNo" | m -p "Audio")"
sonido="$(printf "Sí\nNo" | m -p "Audio")"
if [ "$sonido" = "Sí" ]; then
# find default audio device
pacmd="$(pacmd list-sources | grep -i -B 1 output)"
dev="$(echo "$pacmd" | grep -i '\* index' ||
echo "$pacmd" | grep -i 'index' | head -n 1)"
audio="-f pulse -i $(echo "$dev" | grep -o '[0-9]')"
else
audio=""
fi
if [ "$sonido" = "Sí" ]; then
# find default audio device
pacmd="$(pacmd list-sources | grep -i -B 1 output)"
dev="$(echo "$pacmd" | grep -i '\* index' ||
echo "$pacmd" | grep -i 'index' | head -n 1)"
audio="-f pulse -i $(echo "$dev" | grep -o '[0-9]')"
else
audio=""
fi
elif [ "$method" = "Selección" ]; then
gif="$(printf "Sí\nNo" | m -p "Gif")"
gif="$(printf "Sí\nNo" | m -p "Gif")"
if [ "$gif" = "Sí" ]; then
output="$HOME/vid/Screen/$(date '+%F_%H_%M').gif"
fps=15
fi
if [ "$gif" = "Sí" ]; then
output="$HOME/vid/Screen/$(date '+%F_%H_%M').gif"
fps=15
fi
# select an area and make each number a separate word
set -- $(slop -f '%w %h %x %y')
# select an area and make each number a separate word
set -- $(slop -f '%w %h %x %y')
# get information about the display
width="$1"
height="$2"
offX="$3"
offY="$4"
# get information about the display
width="$1"
height="$2"
offX="$3"
offY="$4"
[ "$((width % 2))" = 1 ] && width="$((width + 1))"
[ "$((height % 2))" = 1 ] && height="$((height + 1))"
[ "$((width % 2))" = 1 ] && width="$((width + 1))"
[ "$((height % 2))" = 1 ] && height="$((height + 1))"
else
notify-send -t 3000 -u critical "Método inválido"
exit 1
notify-send -t 3000 -u critical -i "$ICON_NO" "Método inválido"
exit 1
fi
# ask the user if they want to start the recording
[ ! "$ready" ] && ready="$(printf "Sí\nNo" | m -p "Empezar")"
[ "$ready" = "Sí" ] && {
notify-send -t 2000 "Grabando"
notify-send -t 2000 -i "$ICON_RECORD" "Grabando"
ffmpeg \
-loglevel error \
-y \
-thread_queue_size 4096 \
$audio \
-f x11grab \
-draw_mouse 1 \
-s "${width}x$height" \
-r "$fps" \
-i "$DISPLAY.0+$offX,$offY" \
-pix_fmt yuv420p \
-q:v 0 \
"$output" &
ffmpeg \
-loglevel error \
-y \
-thread_queue_size 4096 \
$audio \
-f x11grab \
-draw_mouse 1 \
-s "${width}x$height" \
-r "$fps" \
-i "$DISPLAY.0+$offX,$offY" \
-pix_fmt yuv420p \
-q:v 0 \
"$output" &
echo $! >/tmp/blaze-pid
echo $! > /tmp/blaze-pid
}

View File

@ -3,31 +3,31 @@
file="/tmp/.minimized"
touch "$file"
lines=$(awk 'END{print NR}' "$file")
icon="$XDG_DATA_HOME/icons/Marwaita-Dark/24x24/categories/preferences-system-windows.svg"
icon="$HOME/img/.icn/Deskbar_Window_Visible.svg"
case $1 in
hide)
if [ "$lines" -ge 15 ]; then
notify-send -i "$icon" "15 ventanas minimizadas" "Mejor cerrar algunas antes de esconder todavía más"
else
focusedNode=$(bspc query -N -n .focused)
focusedID=$(bspc query -D -d --names)
focusedName=$(xprop -id "$focusedNode" WM_NAME | cut -d\" -f2)
hide)
if [ "$lines" -ge 15 ]; then
notify-send -i "$icon" "15 ventanas minimizadas" "Mejor cerrar algunas antes de esconder todavía más"
else
focusedNode=$(bspc query -N -n .focused)
focusedID=$(bspc query -D -d --names)
focusedName=$(xprop -id "$focusedNode" WM_NAME | cut -d\" -f2)
echo "$focusedNode $focusedID $focusedName" >> "$file"
xdo hide "$focusedNode"
notiflines="$((lines +1))"
notify-send -i "$icon" "${notiflines} ventanas escondidas." "$focusedName"
fi
;;
show)
[ -z "$file" ] && exit
echo "$focusedNode $focusedID $focusedName" >> "$file"
xdo hide "$focusedNode"
notiflines="$((lines + 1))"
notify-send -i "$icon" "${notiflines} ventanas escondidas." "$focusedName"
fi
;;
show)
[ -z "$file" ] && exit
sel=$(awk '{print $2,$3}' "$file" | rofi -dmenu -p ' ')
selectedID=$(awk -v pat="$sel" '$0~pat {print $1}' "$file")
selectedDesktop=$(awk -v pat="$sel" '$0~pat {print $2}' "$file")
bspc desktop -f "$selectedDesktop"
xdo show "$selectedID"
sed -i "/${sel}/d" "$file"
;;
sel=$(awk '{print $2,$3}' "$file" | rofi -dmenu -p ' ')
selectedID=$(awk -v pat="$sel" '$0~pat {print $1}' "$file")
selectedDesktop=$(awk -v pat="$sel" '$0~pat {print $2}' "$file")
bspc desktop -f "$selectedDesktop"
xdo show "$selectedID"
sed -i "/${sel}/d" "$file"
;;
esac

View File

@ -2,20 +2,25 @@
file=$HOME/img/scrot/"$(date +%F_%H_%M)".png
vent=$(bspc query -N -n .focused)
icon="$XDG_DATA_HOME/icons/Haiku/scalable/apps/applets-screenshooter.svg"
notify() {
notify-send -i "$icon" "Pantalla Capturada"
}
case "$(printf "Seleccion\\nVentana\\nPantalla\\nCopiar seleccion\\nCopiar ventana\\nCopiar pantalla" | rofi -dmenu -p " ")" in
"Seleccion") maim -us "$file" ;;
"Ventana") maim -ui "$(printf "%d\n" $vent)" "$file" ;;
"Pantalla")
conectados=$(xrandr | awk '( $2 == "connected" ) { count++ } END { print count }')
if [ "$conectados" = 1 ]; then
maim -u "$file"
elif [ "$conectados" = 2 ]; then
moni="$(xrandr | awk '( $2 == "connected" ) { print $1 }' | rofi -dmenu -p "Pantalla")"
maim -u "$moni" "$file"
fi
;;
"Copiar seleccion") maim -us | xclip -selection clipboard -t image/png ;;
"Copiar ventana") maim -ui "$(printf "%d\n" "$vent")" | xclip -selection clipboard -t image/png ;;
"Copiar pantalla") maim -u | xclip -selection clipboard -t image/png ;;
"Seleccion") maim -us "$file" ;;
"Ventana") maim -ui "$(printf "%d\n" $vent)" "$file" ;;
"Pantalla")
conectados=$(xrandr | awk '( $2 == "connected" ) { count++ } END { print count }')
if [ "$conectados" = 1 ]; then
maim -u "$file"
elif [ "$conectados" = 2 ]; then
moni="$(xrandr | awk '( $2 == "connected" ) { print $1 }' | rofi -dmenu -p "Pantalla")"
maim -u "$moni" "$file"
fi
;;
"Copiar seleccion") maim -us | xclip -selection clipboard -t image/png && notify ;;
"Copiar ventana") maim -ui "$(printf "%d\n" "$vent")" | xclip -selection clipboard -t image/png && notify ;;
"Copiar pantalla") maim -u | xclip -selection clipboard -t image/png && notify ;;
esac

View File

@ -1,7 +1,6 @@
#!/bin/zsh
icon1="$HOME/img/.icn/trans1.png"
icon2="$HOME/img/.icn/trans2.png"
icon="$XDG_DATA_HOME/icons/Haiku/scalable/apps/transmission.svg"
killall transmission-daemon 2> /dev/null
transmission-daemon --foreground --log-info 2>&1 | while read line; do
@ -10,9 +9,9 @@ transmission-daemon --foreground --log-info 2>&1 | while read line; do
grep -v "Saved.*variant.c:" |
while read line; do
echo $line | grep -q "Queued for verification (verify.c:" &&
notify-send -i "$icon1" --app-name="Transmission Started" "${line#* * }"
notify-send -i "$icon" --app-name="Transmission Started" "${line#* * }"
echo $line | grep -q "changed from .Incomplete. to .Complete." &&
notify-send -i "$icon2" --app-name="Transmission Complete" "${line#* * }"
notify-send -i "$icon" --app-name="Transmission Complete" "${line#* * }"
# echo $line | systemd-cat --identifier="TransWrap" --priority=5
done 2>&1 > /dev/null
done&disown

View File

@ -20,15 +20,8 @@ tele() {
mpv https://twitch.tv/"$canal"
}
shutub() {
video="$(rofi -theme dprompt -dmenu -i -p " ")" 2>/dev/null
[ -z "$video" ] && exit 0
mpv https://www.youtube.com/watch?v="$video"
}
MENU="$(printf "Twitch\\nYoutube\\nTuto" | $m -p " ")"
MENU="$(printf "Twitch\\nTuto" | $m -p " ")"
case $MENU in
'Twitch') tele ;;
'Youtube') shutub ;;
'Tuto') tutos ;;
esac

View File

@ -5,8 +5,8 @@ pri=$(xrandr | awk '( $2 == "connected" ) { print $1 }' | sed -sn 1p)
xrandr --output "$pri" --primary --auto --scale 1.0x1.0 "$(xrandr | awk '( $2 == "disconnected" {print "--output", $1, "--off"}' | paste -sd ' ')"
if [ -e /tmp/bspwm_0_0-socket ]; then
bspc config remove_disabled_monitors
bspc config remove_unplugged_monitors
bspc config remove_disabled_monitors true
bspc config remove_unplugged_monitors true
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
bspc rule -a Firefox:Navigator state=tiled, desktop='^2'
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh
sudo xbps-install -Su
doas xbps-install -Su
echo "Actualizando la lista de paquetes..."
paclist
echo "Listo."

View File

@ -1,5 +1,3 @@
#!/bin/sh
conectados=$(xrandr | awk '( $2 == "connected" ) { count++ } END { print count }')
[ "$conectados" = 2 ] && exec snooze -H \* -s 1h -t ./timefile sh -c 'randbg ; touch ./timefile' || exit
exec snooze -H \* -s 1h -t ./timefile sh -c 'randbg ; touch ./timefile'

11
.zshenv
View File

@ -5,6 +5,7 @@ else
export EDITOR="nvim"
fi
export EXINIT="set ai ic nu sm smd"
export VISUAL="$EDITOR"
export GIT_EDITOR="$EDITOR"
export TERMINAL="alacritty"
@ -29,7 +30,7 @@ export GPG_TTY=$(tty)
export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
export SSH_ASKPASS="/bin/gnome-ssh-askpass"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/pass"
eval $(keychain --dir ~/.local/share/keychain --quiet --eval --noask --agents ssh,gpg id_rsa)
eval $(keychain --dir ~/.local/share/keychain --quiet --eval --noask --clear --agents ssh,gpg id_ed25519)
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
@ -53,15 +54,15 @@ eval "$(sed 's/^[^#].*/export &/g;t;d' ${DIR:-$XDG_CONFIG_HOME}/user-dirs.dirs)"
# }}}
# FZF {{{
export FZF_DEFAULT_OPTS="--cycle \
--color=bg:-1,hl:#5fff87,bg+:-1,hl+:#ffaf5f \
--color=bg:-1,hl:#5fff87,bg+:-1,hl+:#ffaf5f,border:#080808 \
--color=info:#af87ff,prompt:#5fff87,pointer:#ff87d7,marker:#ff87d7,spinner:#ff87d7 \
--reverse \
--inline-info \
--no-bold \
--ansi \
--pointer='🡢' \
--marker='⦁' \
--preview-window :wrap:noborder"
--marker='⦁ ' \
--preview-window :wrap:sharp"
export FZF_DEFAULT_COMMAND="fd -t f -c always -H"
export FZF_COMPLETION_OPTS='+c -x'
@ -85,6 +86,6 @@ export LESSHISTFILE="-"
# }}}
# Path {{{
typeset -U PATH path
path=(~/.local/bin ~/.config/yarn/bin ~/.local/share/npm/bin $path[@])
path=(~/.local/bin ~/.config/yarn/bin ~/.local/share/npm/bin $GOPATH/bin $path[@])
# }}}
# vim:foldmethod=marker:foldlevel=0

View File

@ -1,4 +1,5 @@
ImageMagick
MesaLib-devel
alacritty
alsa-plugins-ffmpeg
alsa-plugins-jack
@ -13,6 +14,7 @@ bombadillo
bspwm
catgirl
chrony
cmake
cpupower
cryptsetup
delta
@ -25,13 +27,14 @@ elogind
faac
fd
ffmpeg
ffmpeg-devel
figlet
file-roller
firefox
fontconfig-devel
freepats
fzf
gcc
giada
git
git-extras
git-libsecret
@ -49,19 +52,23 @@ hsetroot
htop
hugo
i3lock-color
inetutils-telnet
intel-ucode
isync
iwd
jack
keychain
krita
lf
libX11-devel
libXcursor-devel
libXi-devel
libopenal
libressl-devel
librsvg
librsvg-utils
libva-intel-driver
lm_sensors
love
maim
mdadm
mlocate
@ -79,11 +86,13 @@ neovim-remote
newsboat
nfs-utils
nicotine+
ninja
nodejs
notmuch
noto-fonts-cjk
noto-fonts-emoji
noto-fonts-ttf
opendoas
openjdk11
p7zip
pass
@ -97,7 +106,6 @@ pulseaudio
pulsemixer
python3
python3-pip
python3-urwid
qjackctl
ripgrep
rkhunter
@ -106,7 +114,6 @@ setxkbmap
shellcheck
shfmt
simple-mtpfs
slrn
snooze
socklog-void
straw-viewer