From 7209bb458692904929171bd1bc677ad1c656752c Mon Sep 17 00:00:00 2001 From: DeadGit Date: Fri, 18 Sep 2020 12:28:01 -0300 Subject: [PATCH] un poco mas de limpieza y cambios en nvim. de a poco preparandome para cuando 0.5 sea estable --- .config/X11/xresources | 12 +- .config/git/config | 26 +-- .config/nvim/after/ftplugin/foxdot.vim | 1 - .config/nvim/after/ftplugin/javascript.vim | 5 +- .config/nvim/after/ftplugin/mail.vim | 61 ------ .config/nvim/after/ftplugin/markdown.vim | 25 ++- .config/nvim/after/ftplugin/vim.vim | 1 - .config/nvim/autoload/dead/functions.vim | 10 + .config/nvim/autoload/dead/statusline.vim | 23 +-- .config/nvim/autoload/dead/tabline.vim | 2 +- .config/nvim/ftdetect/vimwiki.vim | 2 +- .config/nvim/{after => }/ftplugin/help.vim | 0 .config/nvim/{after => }/ftplugin/man.vim | 0 .config/nvim/ftplugin/markdown.vim | 1 - .config/nvim/init.vim | 1 - .config/nvim/plugin/mappings/normal.vim | 10 +- .config/nvim/plugin/settings.vim | 5 +- .config/nvim/plugin/statusline.vim | 14 +- .config/nvim/syntax/foxdot.vim | 208 --------------------- .config/zsh/.zshrc | 15 +- .config/zsh/zmarks.zsh | 10 + .local/bin/escribir | 29 +-- .local/bin/tsc | 3 - 23 files changed, 103 insertions(+), 361 deletions(-) delete mode 100644 .config/nvim/after/ftplugin/foxdot.vim delete mode 100644 .config/nvim/after/ftplugin/mail.vim delete mode 100644 .config/nvim/after/ftplugin/vim.vim rename .config/nvim/{after => }/ftplugin/help.vim (100%) rename .config/nvim/{after => }/ftplugin/man.vim (100%) delete mode 100644 .config/nvim/ftplugin/markdown.vim delete mode 100644 .config/nvim/syntax/foxdot.vim create mode 100644 .config/zsh/zmarks.zsh delete mode 100755 .local/bin/tsc diff --git a/.config/X11/xresources b/.config/X11/xresources index edd1c1e..3913fc5 100644 --- a/.config/X11/xresources +++ b/.config/X11/xresources @@ -41,16 +41,16 @@ dmenu.foreground: #380000 dmenu.selbackground: #fccb00 dmenu.selforeground: #380000 +Sxiv.font: chicagoflf:size=9 +Sxiv.background: black +Sxiv.foreground: white + +Xcursor.theme:BloxCursors-White + Xft.autohint: 0 Xft.lcdfilter: lcddefault Xft.hintstyle: hintslight Xft.hinting: 1 Xft.antialias: 1 Xft.rgba: rgb - -Xcursor.theme:BloxCursors-White - -Sxiv.font: chicagoflf:size=9 -Sxiv.background: black -Sxiv.foreground: white Xft.dpi: 112.583 diff --git a/.config/git/config b/.config/git/config index a23a13c..7d4dfee 100644 --- a/.config/git/config +++ b/.config/git/config @@ -34,23 +34,23 @@ diffFilter = delta --color-only [delta] - features = side-by-side line-numbers decorations - syntax-theme = Dracula - plus-style = syntax "#003800" - minus-style = syntax "#3f0001" - whitespace-error-style = 22 reverse + features = side-by-side line-numbers decorations + syntax-theme = Dracula + plus-style = syntax "#003800" + minus-style = syntax "#3f0001" + whitespace-error-style = 22 reverse [delta "decorations"] - commit-decoration-style = bold yellow box ul - file-style = bold yellow ul - file-decoration-style = none - hunk-header-decoration-style = cyan box ul + commit-decoration-style = bold yellow box ul + file-style = bold yellow ul + file-decoration-style = none + hunk-header-decoration-style = cyan box ul [delta "line-numbers"] - line-numbers-left-style = cyan - line-numbers-right-style = cyan - line-numbers-minus-style = 124 - line-numbers-plus-style = 28 + line-numbers-left-style = cyan + line-numbers-right-style = cyan + line-numbers-minus-style = 124 + line-numbers-plus-style = 28 [web] browser = firefox diff --git a/.config/nvim/after/ftplugin/foxdot.vim b/.config/nvim/after/ftplugin/foxdot.vim deleted file mode 100644 index 8d656d6..0000000 --- a/.config/nvim/after/ftplugin/foxdot.vim +++ /dev/null @@ -1 +0,0 @@ -au BufNewFile,BufRead *.foxdot setfiletype=foxdot diff --git a/.config/nvim/after/ftplugin/javascript.vim b/.config/nvim/after/ftplugin/javascript.vim index d8c92bf..92d2e06 100644 --- a/.config/nvim/after/ftplugin/javascript.vim +++ b/.config/nvim/after/ftplugin/javascript.vim @@ -1,2 +1,5 @@ let b:ale_linters = ['prettier_standard'] -let g:ale_fixers = ['prettier_standard'] +let b:ale_fixers = ['prettier_standard'] +setlocal suffixesadd+=.js +setlocal include=^\\s*[^\/]\\+\\(from\\\|require(['\"]\\) +setlocal define=^\\s*function diff --git a/.config/nvim/after/ftplugin/mail.vim b/.config/nvim/after/ftplugin/mail.vim deleted file mode 100644 index ae992fa..0000000 --- a/.config/nvim/after/ftplugin/mail.vim +++ /dev/null @@ -1,61 +0,0 @@ -" 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,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 [s -nnoremap ]s -nnoremap z= -nnoremap zg -inoremap u[s1z=`]au -nnoremap :call SendMail() -nnoremap f gg/From::nohlsearch4lC: -nnoremap t gg/To::nohlsearch2lC: -nnoremap c gg/Cc::nohlsearch2lC: -nnoremap b gg/Bcc::nohlsearch3lC: -nnoremap s gg/Subject::nohlsearch7lC: diff --git a/.config/nvim/after/ftplugin/markdown.vim b/.config/nvim/after/ftplugin/markdown.vim index a2f9733..0b864e9 100644 --- a/.config/nvim/after/ftplugin/markdown.vim +++ b/.config/nvim/after/ftplugin/markdown.vim @@ -1,21 +1,26 @@ 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 autoindent noruler colorcolumn=80 synmaxcol=0 setlocal spell spelllang=es,en_us,cjk set complete+=kspell " Spellcheck -nnoremap [s -nnoremap ]s -nnoremap z= -nnoremap z=1 -nnoremap zg +nnoremap [s +nnoremap ]s +nnoremap z= +nnoremap z=1 +nnoremap zg " Todo list -nnoremap i-[] -nnoremap :.s/\[\]/\[x\] -inoremap -[] -inoremap :.s/\[\]/\[x\] +nnoremap i-[] +nnoremap :.s/\[\]/\[x\] +inoremap -[] +inoremap :.s/\[\]/\[x\] + +" Markdown jump to next heading +nnoremap ]] :call dead#functions#JumpToNextHeading("down", v:count1) +nnoremap [[ :call dead#functions#JumpToNextHeading("up", v:count1) + let b:ale_fixers = ['prettier_standard'] diff --git a/.config/nvim/after/ftplugin/vim.vim b/.config/nvim/after/ftplugin/vim.vim deleted file mode 100644 index cad5b94..0000000 --- a/.config/nvim/after/ftplugin/vim.vim +++ /dev/null @@ -1 +0,0 @@ -let b:ale_linters = ['vint'] diff --git a/.config/nvim/autoload/dead/functions.vim b/.config/nvim/autoload/dead/functions.vim index 09f407f..7e03e84 100644 --- a/.config/nvim/autoload/dead/functions.vim +++ b/.config/nvim/autoload/dead/functions.vim @@ -16,3 +16,13 @@ function! dead#functions#Relativize(v) abort let &relativenumber = a:v endif endfunction + +function! dead#functions#JumpToNextHeading(direction, count) + 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) + endif + silent execute "normal! " . col . "|" + unlet col +endfunction diff --git a/.config/nvim/autoload/dead/statusline.vim b/.config/nvim/autoload/dead/statusline.vim index 06d233a..b3bd3fc 100644 --- a/.config/nvim/autoload/dead/statusline.vim +++ b/.config/nvim/autoload/dead/statusline.vim @@ -8,34 +8,29 @@ endfunction function! dead#statusline#StatusLine() abort let l:statusline='' + let l:statusline.='%#error#' + let l:statusline.=dead#statusline#LinterStatus() + let l:statusline.='%#User1#' + let l:statusline.=dead#statusline#LinePasteMode() + let l:statusline.='%= ' let l:statusline.=dead#statusline#ModeColor() let l:statusline.=dead#statusline#CurrentMode() - let l:statusline.=dead#statusline#LinePasteMode() - let l:statusline.='%<' - let l:statusline.='%1* ' - let l:statusline.='%= ' - let l:statusline.=coc#status() - let l:statusline.=dead#statusline#LinterStatus() - let l:statusline.='%3* %p%% %c ' - let l:statusline.='' return l:statusline endfunction function! dead#statusline#StatusLineNC() abort let l:statusline='' - let l:statusline.='%t' - let l:statusline.='%<' + let l:statusline.='%#User1#' let l:statusline.='%= ' + let l:statusline.='%f ' return l:statusline endfunction function! dead#statusline#HelpStatusLine() abort let l:statusline='' - let l:statusline.= '%#error#[HELP] %t ' - let l:statusline.='%1* ' - let l:statusline.='%<' + let l:statusline.='%#User4#' let l:statusline.='%= ' - let l:statusline.=' %p%% ' + let l:statusline.='%h' return l:statusline endfunction diff --git a/.config/nvim/autoload/dead/tabline.vim b/.config/nvim/autoload/dead/tabline.vim index fa29862..fdc7c48 100644 --- a/.config/nvim/autoload/dead/tabline.vim +++ b/.config/nvim/autoload/dead/tabline.vim @@ -13,7 +13,7 @@ function! dead#tabline#Tabline() abort let s .= '%' . tab . 'T' let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#') let s .= ' ' . tab .':' - let s .= (bufname !=? '' ? fnamemodify(bufname, ':t') . ' ' : '[Untitled] ') + let s .= (bufname !=? '' ? fnamemodify(bufname, ':f') . ' ' : '[Untitled] ') if bufmodified let s .= ' + ' diff --git a/.config/nvim/ftdetect/vimwiki.vim b/.config/nvim/ftdetect/vimwiki.vim index 3f3af78..43889cf 100644 --- a/.config/nvim/ftdetect/vimwiki.vim +++ b/.config/nvim/ftdetect/vimwiki.vim @@ -1,4 +1,4 @@ -autocmd BufRead,BufNewFile *.wiki setlocal filetype=markdown +autocmd BufRead,BufNewFile *.wiki setlocal filetype=markdown.pandoc autocmd bufnewfile ~/doc/blog/*.wiki call append(1, 'Date: ') autocmd BufNewFile,BufReadPre ~/doc/blog/*.wiki exe "g/Date: */s/Date: /# " .strftime("%F") diff --git a/.config/nvim/after/ftplugin/help.vim b/.config/nvim/ftplugin/help.vim similarity index 100% rename from .config/nvim/after/ftplugin/help.vim rename to .config/nvim/ftplugin/help.vim diff --git a/.config/nvim/after/ftplugin/man.vim b/.config/nvim/ftplugin/man.vim similarity index 100% rename from .config/nvim/after/ftplugin/man.vim rename to .config/nvim/ftplugin/man.vim diff --git a/.config/nvim/ftplugin/markdown.vim b/.config/nvim/ftplugin/markdown.vim deleted file mode 100644 index 4271828..0000000 --- a/.config/nvim/ftplugin/markdown.vim +++ /dev/null @@ -1 +0,0 @@ -setlocal synmaxcol=0 diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 7a09ca8..25456ef 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -89,7 +89,6 @@ let g:markdown_fenced_languages = ['vim', 'help'] let g:javascript_plugin_jsdoc = 1 "}}} " Plugins {{{ -packadd! vim-polyglot packadd! pear-tree packadd! loupe packadd! vim-commentary diff --git a/.config/nvim/plugin/mappings/normal.vim b/.config/nvim/plugin/mappings/normal.vim index b8bc1ae..1eb6827 100644 --- a/.config/nvim/plugin/mappings/normal.vim +++ b/.config/nvim/plugin/mappings/normal.vim @@ -1,5 +1,3 @@ -"Normal mode - " Ñ master race nnoremap ñ ; nnoremap Ñ , @@ -59,10 +57,10 @@ nnoremap y 0y$ nnoremap Y y$ " Tab movement -nnoremap tn :tabnew -nnoremap th :tabfirst -nnoremap tl :tablast -nnoremap tx :tabclose +nnoremap tn :tabnew +nnoremap th :tabfirst +nnoremap tl :tablast +nnoremap tx :tabclose " Prevent x from overriding what's in the clipboard. nnoremap x "_x diff --git a/.config/nvim/plugin/settings.vim b/.config/nvim/plugin/settings.vim index d30395a..6c91202 100644 --- a/.config/nvim/plugin/settings.vim +++ b/.config/nvim/plugin/settings.vim @@ -5,6 +5,7 @@ set inccommand=nosplit set clipboard^=unnamedplus set number set noshowmode +set noshowcmd set showtabline=2 set noswapfile set hidden @@ -54,11 +55,7 @@ set listchars+=precedes:<,extends:> set conceallevel=1 set diffopt+=algorithm:histogram,indent-heuristic set diffopt+=foldcolumn:0 -set pastetoggle= match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' - -let mapleader="\" -let maplocalleader=',' let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*' let g:netrw_dirhistmax=0 diff --git a/.config/nvim/plugin/statusline.vim b/.config/nvim/plugin/statusline.vim index 4db5c48..8028f78 100644 --- a/.config/nvim/plugin/statusline.vim +++ b/.config/nvim/plugin/statusline.vim @@ -1,12 +1,12 @@ scriptencoding utf-8 -highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#c6c6c6 -highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782 -highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4 -highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6 -highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff -highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34 -highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a +highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#666666 cterm=none +highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782 cterm=none +highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4 cterm=none +highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6 cterm=none +highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff cterm=none +highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34 cterm=none +highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a cterm=none let g:modes={ \ 'n' : ['%3*', 'NORMAL'], diff --git a/.config/nvim/syntax/foxdot.vim b/.config/nvim/syntax/foxdot.vim deleted file mode 100644 index 438f45d..0000000 --- a/.config/nvim/syntax/foxdot.vim +++ /dev/null @@ -1,208 +0,0 @@ -" quit when a syntax file was already loaded -if exists("b:current_syntax") - finish -endif - -syntax case match - -"syntax region foxdotInstrument start=/(/ skip=/\\(\\)/ end=/)/ -"syntax region foxdotArray start=/[/ end=/]/ - -syn keyword foxdotSynths - \ loop - \ gsynth - \ play - \ play1 - \ play2 - \ audioin - \ noise - \ dab - \ varsaw - \ lazer - \ growl - \ bass - \ dirt - \ crunch - \ rave - \ jbass - \ scatter - \ charm - \ bell - \ gong - \ soprano - \ dub - \ viola - \ scratch - \ klank - \ feel - \ glass - \ soft - \ quin - \ pluck - \ spark - \ blip - \ ripple - \ creep - \ orient - \ zap - \ marimba - \ fuzz - \ bug - \ pulse - \ saw - \ snick - \ twang - \ karp - \ arpy - \ nylon - \ donk - \ squish - \ swell - \ razz - \ sitar - \ star - \ piano - \ sawbass - \ prophet - \ pads - \ pasha - \ ambi - \ space - \ keys - \ dbass - \ sinepad - \ Clock - \ Group - \ Master - -syn keyword foxdotAttribs - \ degree - \ oct - \ freq - \ dur - \ delay - \ buf - \ blur - \ amplify - \ scale - \ bpm - \ sample - \ env - \ fmod - \ pan - \ rate - \ amp - \ midinote - \ channel - \ vib - \ vibdepth - \ slide - \ sus - \ slidedelay - \ slidefrom - \ bend - \ benddelay - \ coarse - \ striate - \ pshift - \ hpf - \ hpr - \ lpf - \ lpr - \ bpf - \ bpr - \ bpnoise - \ bits - \ amp - \ crush - \ dist - \ tmp - \ chop - \ tremolo - \ beat_dur - \ echo - \ spin - \ cut - \ room - \ mix - \ formant - \ shape - \ drive - -syn keyword foxdotVars - \ var - \ linvar - \ now - \ pitch - \ follow - \ PDur - \ PWalk - \ PStep - \ stop - \ sometimes - \ often - \ every - \ clear - -syn keyword foxdotScales - \ aeolian - \ chinese - \ chromatic - \ custom - \ default - \ diminished - \ dorian - \ dorian2 - \ egyptian - \ freq - \ harmonicMajor - \ harmonicMinor - \ indian - \ justMajor - \ justMinor - \ locrian - \ locrianMajor - \ lydian - \ lydianMinor - \ major - \ majorPentatonic - \ melodicMajor - \ melodicMinor - \ minor - \ minorPentatonic - \ mixolydian - \ phrygian - \ prometheus - \ romanianMinor - \ yu - \ zhi - -syn match foxdotOperator '\V=\|-\|+\|*\|@\|/\|%\|&\||\|^\|~\|<\|>\|!=' -"syn match foxdotError '[$?]\|\([-+@%&|^~]\)\1\{1,}\|\([=*/<>]\)\2\{2,}\|\([+@/%&|^~<>]\)\3\@![-+*@/%&|^~<>]\|\*\*[*@/%&|^<>]\|=[*@/%&|^<>]\|-[+*@/%&|^~<]\|[]\+=\{2,}\|!\{2,}=\+' display -syn match foxdotError '\<\d\+[^0-9[:space:]]\+\>' display -syn match foxdotComment "\v#.*$" -syn match foxdotNumberError '\<\d[_0-9]*\D\>' display -syn match foxdotNumberError '\<0[_0-9]\+\>' display -syn match foxdotNumberError '\<0_x\S*\>' display -syn match foxdotNumberError '\<0[bBxXoO][_0-9a-fA-F]*_\>' display -syn match foxdotNumberError '\<\d[_0-9]*_\>' display -syn match foxdotNumber '\<\d\>' display -syn match foxdotNumber '\<[1-9][_0-9]*\d\>' display -syn match foxdotNumber '\<\d[jJ]\>' display -syn match foxdotNumber '\<[1-9][_0-9]*\d[jJ]\>' display -syn match foxdotFloat '\.\d\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=\>' display -syn match foxdotFloat '\<\d\%([_0-9]*\d\)\=[eE][+-]\=\d\%([_0-9]*\d\)\=[jJ]\=\>' display -syn match foxdotFloat '\<\d\%([_0-9]*\d\)\=\.\d\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=' display - -hi def link foxdotSynths Function -hi def link foxdotNumber Number -hi def link foxdotFloat Number -hi def link foxdotScales Keyword -hi def link foxdotAttribs Label -hi def link foxdotVars Conditional -hi def link foxdotComment Comment -hi def link foxdotError Error -hi def link foxdotNumberError Error -hi def link foxdotOperator Operator - -let b:current_syntax = "foxdot" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index fcd3d3d..fac9616 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -9,12 +9,12 @@ 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. +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. 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. @@ -26,7 +26,7 @@ setopt AUTO_PARAM_SLASH # Tab completing directory appends a slash setopt PROMPT_SUBST # }}} # Historial {{{ -export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help:* --version:* -v:* -h:man *:up:tuir *" +export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help:* --version:* -v:* -h:man *:up" HISTFILE="$ZDOTDIR/histfile" HISTSIZE=10000 SAVEHIST=10000 @@ -108,4 +108,3 @@ echo -ne '\e[5 q' preexec() { echo -ne '\e[6 q' ;} # }}} # vim:foldmethod=marker:foldlevel=0 - diff --git a/.config/zsh/zmarks.zsh b/.config/zsh/zmarks.zsh new file mode 100644 index 0000000..87d33b4 --- /dev/null +++ b/.config/zsh/zmarks.zsh @@ -0,0 +1,10 @@ +hash -d gl=$HOME/.local/share +hash -d gb=$HOME/.local/bin +hash -d g.=$HOME/.config +hash -d gm=$HOME/snd/Albums +hash -d gd=$HOME/doc +hash -d gv=$HOME/vid +hash -d ge=$HOME/etc +hash -d gp=$HOME/img +hash -d gc=/mnt/cel +hash -d gr=/mnt/remote diff --git a/.local/bin/escribir b/.local/bin/escribir index db6c42e..567f749 100755 --- a/.local/bin/escribir +++ b/.local/bin/escribir @@ -2,22 +2,22 @@ diario() { cd "$HOME/doc/blog" || exit - menublog=$(printf "Hoy\\nMañana\\nAyer\\nArchivo" | dmenu -i -w 120 -p " ") - case $menublog in - "Hoy") alacritty --class=flota -e nvim "$(date -I)".wiki ;; - "Mañana") alacritty --class=flota -e nvim "$(date --date='tomorrow' +%F)".wiki ;; - "Ayer") alacritty --class=flota -e nvim "$(date --date='yesterday' +%F)".wiki ;; + menuBlog=$(printf "Hoy\\nMañana\\nAyer\\nArchivo" | dmenu -i -w 120 -p " ") + case $menuBlog in + "Hoy") alacritty --class=flota -e nvim "$(date -I)".md ;; + "Mañana") alacritty --class=flota -e nvim "$(date --date='tomorrow' +%F)".md ;; + "Ayer") alacritty --class=flota -e nvim "$(date --date='yesterday' +%F)".md ;; "Archivo") archivo ;; esac } notas() { cd "$HOME/doc/notas" || exit - menunota=$(printf "Nueva\\nArchivo" | dmenu -i -w 120 -p " ") - case $menunota in + menuNota=$(printf "Nueva\\nArchivo" | dmenu -i -w 120 -p " ") + case $menuNota in "Nueva") nombre="$(dmenu -i -p "Titulo: ")" 2>/dev/null - alacritty --class=flota -e nvim "$nombre".wiki + alacritty --class=flota -e nvim "$nombre".md ;; "Archivo") archivo ;; esac @@ -25,22 +25,23 @@ notas() { articulo() { cd "$HOME/doc/dgy.io" || exit - nom="$(dmenu -i -p "Titulo: ")" 2>/dev/null - nombre="$(echo "$nom" | tr ' ' '-')" - hugo new articulos/"$nombre".md + nombre="$(dmenu -i -p "Titulo: ")" 2>/dev/null + [ -z "$nombre" ] && exit 0 + nombreForm="$(echo "$nombre" | tr ' ' '-')" + hugo new articulos/"$nombreForm".md sleep 1 alacritty --class=flota -e nvim content/articulos/"$nombre".md } archivo() { - selarch=$(fd -d 1 -e wiki | sort -Mr | dmenu -i -w 200 -p " ") + selarch=$(fd -d 1 -e md | sort -Mr | dmenu -i -w 200 -p " ") [ -z "$selarch" ] && exit 0 alacritty --class=flota -e nvim "$selarch" } -MENU="$(printf "Artículo\\nBlog\\nNotas" | dmenu -i -w 130 -p " ")" +MENU="$(printf "Artículo\\nPersonal\\nNotas" | dmenu -i -w 130 -p " ")" case $MENU in -'Blog') diario ;; +'Personal') diario ;; 'Artículo') articulo ;; 'Notas') notas ;; esac diff --git a/.local/bin/tsc b/.local/bin/tsc deleted file mode 100755 index 3c12a3e..0000000 --- a/.local/bin/tsc +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -transmission-remote -l | grep 100% | grep Done | awk '{print $1}' | xargs -n 1 -I % transmission-remote -t % -r