From 1f1fa232211dccd0f7bbbc7b9eda48121650d3b2 Mon Sep 17 00:00:00 2001 From: deadguy Date: Fri, 19 Feb 2021 23:49:48 -0300 Subject: [PATCH] General improvements La mayoria de mi setup ahora se ve bien sin importar si estoy en una sesion de x o en framebuffer. quedan algunas cuestiones pero son las de menos. mejore la manera en la cual manejo el setup multipantalla, focalizandome en servicios con runit y poniendo todo en la configuracion del wm. ahora solo se chequea la presencia de varios monitores en un solo lugar y listo. limpie algunas cosas de nvim y arregle otras que no funcionaban. Borre algunos archivos que no sirven e hice actualizaciones menores a otras cosas. --- .config/X11/xinitrc | 14 +- .config/X11/xresources | 47 ++- .config/alacritty.yml | 2 - .config/bspwm/bspwmrc | 66 +-- .config/copy to etc/autoconfig.cfg | 7 - .config/copy to etc/autoconfig.js | 4 - .config/copy to etc/vconsole.conf | 2 - .config/dunst/dunstrc | 4 +- .config/git/config | 42 -- .config/htop/htoprc | 27 +- .config/lf/lfrc | 1 + .config/ncmpcpp/config | 3 +- .config/newsboat/config | 2 +- .config/nvim/after/ftplugin/go.vim | 14 +- .config/nvim/after/ftplugin/javascript.vim | 19 +- .config/nvim/after/ftplugin/markdown.vim | 12 +- .config/nvim/after/ftplugin/qf.vim | 4 + .config/nvim/after/ftplugin/sh.vim | 16 +- .config/nvim/after/ftplugin/terminal.vim | 10 +- .config/nvim/after/ftplugin/tex.vim | 13 + .config/nvim/after/plugin/coc.vim | 12 +- .config/nvim/autoload/dead/functions.vim | 19 +- .config/nvim/autoload/dead/statusline.vim | 15 +- .config/nvim/coc-settings.json | 70 ++-- .config/nvim/init.vim | 50 ++- .config/nvim/plugin/autocmds.vim | 20 +- .config/nvim/plugin/gitgutter.vim | 6 + .config/nvim/plugin/settings.vim | 6 +- .config/tmux/tmux.conf | 10 +- .config/zsh/.zshrc | 2 +- .config/zsh/conf/00_prompt.zsh | 9 +- .config/zsh/conf/03_aliases.zsh | 9 +- .config/zsh/conf/11_lf-icons.zsh | 462 +++++++++++---------- .config/zsh/tmux.zsh | 3 +- .local/bin/minve | 6 +- .local/bin/monis | 14 +- .local/bin/pantallazo | 8 +- .local/bin/txbar | 34 +- .zshenv | 19 +- doc/xbpaketes | 11 +- 40 files changed, 582 insertions(+), 512 deletions(-) delete mode 100644 .config/copy to etc/autoconfig.cfg delete mode 100644 .config/copy to etc/autoconfig.js delete mode 100644 .config/copy to etc/vconsole.conf diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index e95ed2b..9317359 100644 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -1,10 +1,14 @@ #!/bin/sh -setxkbmap -option caps:escape +setxkbmap -model pc105 -layout latam,latam -variant ,cmk_ed_ks -option caps:escape,grp:shifts_toggle,grp_led:caps xsetroot -cursor_name left_ptr & -equiset & -xss-lock -l -- exeflock4 & +sctd & xrdb -merge "$XDG_CONFIG_HOME/X11/xresources" -monis & -exec runsvdir -P ~/.local/service.x 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' +conectados=$(xrandr | awk '( $2 == "connected" ) { count++ } END { print count }') +if [ "$conectados" = 2 ]; then + monis & + exec runsvdir -P ~/.local/service.2x +else + exec runsvdir -P ~/.local/service.x +fi diff --git a/.config/X11/xresources b/.config/X11/xresources index 3b4ee34..6e0f8db 100644 --- a/.config/X11/xresources +++ b/.config/X11/xresources @@ -4,36 +4,36 @@ *.cursorColor: #b3b1ad ! black -*.color0: #0e0e0e -*.color8: #444444 +*.color0: #2e2e2e +*.color8: #666666 ! red -*.color1: #ff3333 -*.color9: #ff3333 +*.color1: #ef2f27 +*.color9: #eb6655 ! green -*.color2: #aec82a -*.color10: #bae67e +*.color2: #519f50 +*.color10: #98bc37 ! yellow *.color3: #faa030 -*.color11: #fccb00 +*.color11: #ffe64d ! blue -*.color4: #008bbd -*.color12: #73d0ff +*.color4: #34608d +*.color12: #008bbd ! magenta -*.color5: #ab6ba6 -*.color13: #f28779 +*.color5: #e02c6d +*.color13: #ff5c8f ! cyan -*.color6: #6fa69f -*.color14: #95e6cb +*.color6: #0aaeb3 +*.color14: #6fc3df ! white -*.color7: #a89984 -*.color15: #ffffff +*.color7: #d0d0d0 +*.color15: #fcfcfc dmenu.font: System Charcoal:pixelsize=15:antialias=true:autohint=true; dmenu.background: #080808 @@ -47,6 +47,23 @@ Sxiv.foreground: white Xcursor.theme:BloxCursors-White +XTerm*utf8: true +XTerm*metaSendsEscape: true +XTerm*alternateScroll: true +XTerm*allowMouseOps: false +XTerm*bellIsUrgent: true +XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48 + +XTerm*VT100*translations: #override \n\ + Super C: copy-selection(CLIPBOARD) \n\ + Super V: insert-selection(CLIPBOARD) + +XTerm*faceName: PragmataPro Mono:size=11 +XTerm*internalBorder: 6 +XTerm*colorBDMode: true +XTerm*scrollBar: false +XTerm*pointerMode: 2 + Xft.autohint: 0 Xft.lcdfilter: lcddefault Xft.hintstyle: hintslight diff --git a/.config/alacritty.yml b/.config/alacritty.yml index cf8d640..ae64907 100644 --- a/.config/alacritty.yml +++ b/.config/alacritty.yml @@ -39,8 +39,6 @@ font: x: 0 y: 0 - use_thin_strokes: true - draw_bold_text_with_bright_colors: false colors: diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 890ad80..a91ab57 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -1,45 +1,55 @@ #!/bin/sh -bspmonis & +hsetroot -solid "#080808" -bspc config border_width 2 -bspc config window_gap 6 -bspc config split_ratio 0.5 +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 left_padding 0 +bspc config right_padding 0 +bspc config border_width 2 +bspc config window_gap 0 +bspc config split_ratio 0.5 # Opciones -bspc config gapless_monocle true -bspc config ignore_ewmh_focus true -bspc config pointer_follows_focus true -bspc config removal_adjustment true -bspc config honor_size_hints false +bspc config single_monocle true +bspc config borderless_monocle true +bspc config remove_disabled_monitors true +bspc config remove_unplugged_monitors true +bspc config gapless_monocle true +bspc config ignore_ewmh_focus true +bspc config pointer_follows_focus true +bspc config removal_adjustment true +bspc config honor_size_hints false bspc config directional_focus_tightness low -bspc config automatic_scheme longest_side -bspc config initial_polarity second_child -bspc config click_to_focus any -bspc config pointer_modifier mod4 -bspc config pointer_action1 resize_side -bspc config pointer_action2 resize_corner -bspc config pointer_action3 move +bspc config automatic_scheme longest_side +bspc config initial_polarity second_child +bspc config click_to_focus any +bspc config pointer_modifier mod4 +bspc config pointer_action1 resize_side +bspc config pointer_action2 resize_corner +bspc config pointer_action3 move # xrdb get_xrdb() { - xrdb -query | awk -v pat="$1" '$0~pat {print $2}' + xrdb -query | awk -v pat="$1" '$0~pat {print $2}' } # Colores -bspc config normal_border_color "$(get_xrdb color0)" -bspc config focused_border_color "$(get_xrdb color3)" -bspc config active_border_color "$(get_xrdb color8)" -bspc config presel_feedback_color "$(get_xrdb color6)" +bspc config normal_border_color "$(get_xrdb color0)" +bspc config focused_border_color "$(get_xrdb color3)" +bspc config active_border_color "$(get_xrdb color8)" +bspc config presel_feedback_color "$(get_xrdb color6)" # Flotantes -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:Browser state=floating -bspc rule -a Zathura state=tiled -bspc rule -a gzdoom state=fullscreen +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:Browser state=floating +bspc rule -a Firefox:Navigator state=tiled desktop='^2' +bspc rule -a Zathura state=tiled +bspc rule -a gzdoom state=fullscreen unclutter --jitter 30 --timeout 3 --ignore-scrolling & $TERMINAL & diff --git a/.config/copy to etc/autoconfig.cfg b/.config/copy to etc/autoconfig.cfg deleted file mode 100644 index 457bd58..0000000 --- a/.config/copy to etc/autoconfig.cfg +++ /dev/null @@ -1,7 +0,0 @@ -// this goes in /usr/lib/firefox -var {classes:Cc,interfaces:Ci,utils:Cu} = Components; -try { - Cu.import("resource:///modules/AboutNewTab.jsm"); - var newTabURL = "file:///home/deadguy/.mozilla/firefox/thsxpwyd.testing-1586723279098/startpage/index.html"; - AboutNewTab.newTabURL = newTabURL; -} catch(e){Cu.reportError(e);} // report errors in the Browser Console diff --git a/.config/copy to etc/autoconfig.js b/.config/copy to etc/autoconfig.js deleted file mode 100644 index 8d92bad..0000000 --- a/.config/copy to etc/autoconfig.js +++ /dev/null @@ -1,4 +0,0 @@ -// this goes in /usr/lib/firefox/defaults/pref -pref("general.config.filename", "autoconfig.cfg"); -pref("general.config.obscure_value", 0); -pref("general.config.sandbox_enabled", false); diff --git a/.config/copy to etc/vconsole.conf b/.config/copy to etc/vconsole.conf deleted file mode 100644 index 3d76df4..0000000 --- a/.config/copy to etc/vconsole.conf +++ /dev/null @@ -1,2 +0,0 @@ -FONT=Lat2-Terminus16 -KEYMAP=la-latin1 diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index eeeb914..ae12b4f 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -32,7 +32,7 @@ stack_duplicates = true # Merge multiple similar notifications hide_duplicate_count = true sticky_history = no - history_length = 16 + history_length = 1 show_indicators = no # The spacing between lines. If smaller than font height, @@ -59,7 +59,7 @@ dmenu = /usr/bin/dmenu -p dunst: browser = /usr/bin/firefox -new-tab icon_position = right # Align icons left/right/off - max_icon_size = 24 + max_icon_size = 32 # Paths to default icons. icon_path = /home/deadguy/.local/share/icons/Haiku/scalable/actions:/home/deadguy/.local/share/icons/Haiku/scalable/animations:/home/deadguy/.local/share/icons/Haiku/scalable/apps:/home/deadguy/.local/share/icons/Haiku/scalable/categories:/home/deadguy/.local/share/icons/Haiku/scalable/devices:/home/deadguy/.local/share/icons/Haiku/scalable/emblems:/home/deadguy/.local/share/icons/Haiku/scalable/emotes:/home/deadguy/.local/share/icons/Haiku/scalable/mimetypes:/home/deadguy/.local/share/icons/Haiku/scalable/places:/home/deadguy/.local/share/icons/Haiku/scalable/status:/home/deadguy/.local/share/icons/Haiku/scalable/stock diff --git a/.config/git/config b/.config/git/config index faac749..c62e6db 100644 --- a/.config/git/config +++ b/.config/git/config @@ -62,22 +62,6 @@ line-numbers-minus-style = red italic line-numbers-plus-style = green italic -[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 @@ -120,32 +104,6 @@ line-numbers-plus-style = 28 lineNumber = true extendRegexp = true -[color "branch"] - remote = red bold - current = yellow bold - local = yellow -[color "status"] - added = yellow bold - changed = red bold - untracked = red - header = cyan bold - branch = yellow bold -[color "grep"] - separator = green bold - filename = green - linenumber = blue bold -[color "diff"] - meta = yellow - frag = magenta bold - commit = yellow bold - old = red bold - new = green bold - whitespace = red reverse -[color "diff-highlight"] - oldNormal = red bold - oldHighlight = red bold 52 - newNormal = green bold - newHighlight = green bold 22 [gpg] program = gpg2 diff --git a/.config/htop/htoprc b/.config/htop/htoprc index 16b13d7..7156278 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -1,14 +1,14 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -fields=0 48 47 46 2 17 49 18 38 1 -sort_key=38 +fields=0 48 39 2 46 47 49 1 +sort_key=47 sort_direction=1 -tree_sort_key=47 +tree_sort_key=0 tree_sort_direction=1 -hide_kernel_threads=0 -hide_userland_threads=0 +hide_kernel_threads=1 +hide_userland_threads=1 shadow_other_users=0 -show_thread_names=1 +show_thread_names=0 show_program_path=1 highlight_base_name=1 highlight_megabytes=1 @@ -20,17 +20,18 @@ strip_exe_from_cmdline=1 show_merged_command=0 tree_view=1 tree_view_always_by_pid=0 -header_margin=1 -detailed_cpu_time=1 +header_margin=0 +detailed_cpu_time=0 cpu_count_from_one=1 show_cpu_usage=1 show_cpu_frequency=0 -update_process_names=1 +update_process_names=0 account_guest_in_cpu_meter=0 color_scheme=0 enable_mouse=0 delay=15 -left_meters=AllCPUs -left_meter_modes=1 -right_meters=Tasks Memory Swap CPU -right_meter_modes=2 2 2 1 +left_meters=Blank AllCPUs2 Blank +left_meter_modes=2 1 2 +right_meters=Blank Memory Tasks +right_meter_modes=2 2 2 +hide_function_bar=0 diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 11ced05..fec76e7 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -31,6 +31,7 @@ cmd open ${{ case $(file --mime-type $f -bL) in text/*|application/json) vix "$f";; image/gif) setsid sxiv-gif $f 2>/dev/null & ;; + image/svg+xml) display -- $f ;; image/*) setsid sxiv-rifle $f 2>/dev/null & ;; audio/*) mpv $f ;; video/*) setsid mpv $f -quiet >/dev/null 2>&1 & ;; diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config index c3fda5e..2bce8d9 100644 --- a/.config/ncmpcpp/config +++ b/.config/ncmpcpp/config @@ -3,12 +3,11 @@ ncmpcpp_directory = "~/.config/ncmpcpp" execute_on_song_change = "tapa" # VISULAIZER -visualizer_fifo_path = "/tmp/mpd.fifo" +visualizer_data_source = "/tmp/mpd.fifo" visualizer_output_name = "mpd spectrum" visualizer_type = "wave" visualizer_in_stereo = no visualizer_color = "red,yellow,green,cyan,blue,red,yellow,green,cyan,blue,red,yellow,green,cyan,blue,red" -visualizer_sync_interval = 15 visualizer_look = "โˆ™โ”‚" # COLORS diff --git a/.config/newsboat/config b/.config/newsboat/config index cf9508d..31ea7cc 100644 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -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 'elinks %u && tmux kill-pane\n'"; open-in-browser ; set browser linkhandler # vim: ft=conf cms=#%s diff --git a/.config/nvim/after/ftplugin/go.vim b/.config/nvim/after/ftplugin/go.vim index c15c856..d76f4c4 100644 --- a/.config/nvim/after/ftplugin/go.vim +++ b/.config/nvim/after/ftplugin/go.vim @@ -13,13 +13,15 @@ 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 +let g:go_highlight_build_constraints = 1 +let g:go_highlight_fields = 1 +let g:go_highlight_function_calls = 1 +let g:go_highlight_functions = 1 +let g:go_highlight_methods = 1 +let g:go_highlight_operators = 1 +let g:go_highlight_structs = 1 +let g:go_highlight_types = 1 let g:go_highlight_extra_types = 1 -let g:go_highlight_operators = 1 " Status line types/signatures let g:go_auto_type_info = 1 diff --git a/.config/nvim/after/ftplugin/javascript.vim b/.config/nvim/after/ftplugin/javascript.vim index 6ad607e..055df80 100644 --- a/.config/nvim/after/ftplugin/javascript.vim +++ b/.config/nvim/after/ftplugin/javascript.vim @@ -1,6 +1,21 @@ setlocal path=.,** setlocal path-=/usr/include setlocal suffixesadd+=.js -setlocal include=^\\s*[^\/]\\+\\(from\\\|require(['\"]\\) -setlocal define=^\\s*function set wildignore=*.min.*,*/.git/**/*,node_modules/* + +let b:match_words = '\:\,' + \ . '\:\,' + \ . '\:\:\,' + \ . '\:\,' + \ . '\:\:\' + +setlocal include=^\\s*[^\/]\\+\\(from\\\|require(\\)\\s*['\"\.] + +let &l:define = '^\s*\(' + \ . '\(export\s\)*\(default\s\)*\(var\|const\|let\|function\|class\|interface\)\s' + \ . '\|\(public\|private\|protected\|readonly\|static\)\s' + \ . '\|\(get\s\|set\s\)' + \ . '\|\(export\sdefault\s\|abstract\sclass\s\)' + \ . '\|\(async\s\)' + \ . '\|\(\ze\i\+([^)]*).*{$\)' + \ . '\)' diff --git a/.config/nvim/after/ftplugin/markdown.vim b/.config/nvim/after/ftplugin/markdown.vim index d879808..f290876 100644 --- a/.config/nvim/after/ftplugin/markdown.vim +++ b/.config/nvim/after/ftplugin/markdown.vim @@ -1,4 +1,13 @@ -setlocal nonumber norelativenumber laststatus=0 showmode +aug Status + au! + au BufNew,BufEnter *.md set laststatus=0 + au BufHidden,BufLeave *.md set laststatus=2 +aug END + +let g:markdown_syntax_conceal = 0 +let g:markdown_fenced_languages = ['html', 'css', 'yaml', 'toml', 'sh', 'viml=vim'] + +setlocal nonumber norelativenumber setlocal signcolumn=no textwidth=80 wrap sw=2 setlocal tabstop=2 noexpandtab softtabstop=0 linebreak setlocal autoindent ruler colorcolumn=80 @@ -6,6 +15,7 @@ setlocal complete+=kspell setlocal spell spelllang=es,en_us,cjk setlocal formatoptions=1tqnw setlocal comments=n:> +setlocal errorformat="%f",\ line\ %l:\ %m setlocal formatlistpat=^\\s* " Optional leading whitespace setlocal formatlistpat+=[ " Start character class setlocal formatlistpat+=\\[({]\\? " | Optionally match opening punctuation diff --git a/.config/nvim/after/ftplugin/qf.vim b/.config/nvim/after/ftplugin/qf.vim index e482937..f89babe 100644 --- a/.config/nvim/after/ftplugin/qf.vim +++ b/.config/nvim/after/ftplugin/qf.vim @@ -1,6 +1,7 @@ setlocal cursorline setlocal nospell setlocal nolist +set nobuflisted " Close with q nnoremap q :close @@ -44,3 +45,6 @@ if !exists('*s:newer') endtry endfunction endif + +" Quit QuickFix window along with source file window +autocmd WinEnter * if winnr('$') == 1 && getbufvar(winbufnr(winnr()), "&buftype") == "quickfix" | q | endif diff --git a/.config/nvim/after/ftplugin/sh.vim b/.config/nvim/after/ftplugin/sh.vim index 3e5bdd6..4807c44 100644 --- a/.config/nvim/after/ftplugin/sh.vim +++ b/.config/nvim/after/ftplugin/sh.vim @@ -4,12 +4,12 @@ endif let b:sh_indent_options['continuation-line'] = 2 -" command! -buffer -bang Lint compiler shfmt | lmake -" command! -buffer -bang Compile compiler shellcheck | make +if executable('shfmt') + let &l:formatprg='shfmt -i ' . &l:shiftwidth . ' -ln posix -sr -ci -s' +endif -" augroup linty -" au! * -" au BufWritePre Lint -" au BufWritePost :silent Compile -" au QuickFixCmdPost make cwindow -" augroup END +" force Man to be used along side lsc +nnoremap K :Man + +" allow for commands with - in the name +set iskeyword+=- diff --git a/.config/nvim/after/ftplugin/terminal.vim b/.config/nvim/after/ftplugin/terminal.vim index a615c0e..1ef7340 100644 --- a/.config/nvim/after/ftplugin/terminal.vim +++ b/.config/nvim/after/ftplugin/terminal.vim @@ -3,4 +3,12 @@ setlocal nonumber norelativenumber setlocal signcolumn=no setlocal wrap noruler -startinsert! +aug MyTerminal + au! + au TermOpen * set laststatus=0 noshowmode noshowcmd + " 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 showmode showcmd + au BufLeave term://* stopinsert +aug END diff --git a/.config/nvim/after/ftplugin/tex.vim b/.config/nvim/after/ftplugin/tex.vim index c38c638..135d8e8 100644 --- a/.config/nvim/after/ftplugin/tex.vim +++ b/.config/nvim/after/ftplugin/tex.vim @@ -1,2 +1,15 @@ setlocal spell spelllang=es,en_us +setlocal complete+=kspell + +" Spellcheck +nnoremap [s +nnoremap ]s +nnoremap z= +nnoremap z=1 +nnoremap zg inoremap u[s1z=`]au + +aug Create + au! + au BufWritePost *.tex !pdflatex % +aug END diff --git a/.config/nvim/after/plugin/coc.vim b/.config/nvim/after/plugin/coc.vim index e8898ed..c1665ff 100644 --- a/.config/nvim/after/plugin/coc.vim +++ b/.config/nvim/after/plugin/coc.vim @@ -1,9 +1,8 @@ -" if exists('b:coc_enabled=1') set completeopt-=preview nnoremap :vsplit:CocConfig - let g:coc_global_extensions = ['coc-diagnostic', 'coc-prettier', 'coc-highlight', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json', 'coc-emmet'] + let g:coc_global_extensions = ['coc-highlight', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json'] " Use to confirm completion, `u` means break undo chain at current " position. Coc only does snippet and additional edit on confirm. @@ -44,12 +43,3 @@ " 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 (pumvisible() ? (col('.') > 1 ? 'i' : 'i') : '') . -" \ '=pumvisible() ? "\C-n>\C-p>\Down>" : ""' -" " open user completion menu closing previous if open and opening new menu without changing the text -" inoremap (pumvisible() ? (col('.') > 1 ? 'i' : 'i') : '') . -" \ '=pumvisible() ? "\C-n>\C-p>\Down>" : ""' -" endif diff --git a/.config/nvim/autoload/dead/functions.vim b/.config/nvim/autoload/dead/functions.vim index c542960..6818dbb 100644 --- a/.config/nvim/autoload/dead/functions.vim +++ b/.config/nvim/autoload/dead/functions.vim @@ -1,15 +1,3 @@ -function! dead#functions#PopOutOfInsertMode() abort - if v:insertmode - call feedkeys("\\") - endif -endfunction - -function! dead#functions#Relativize(v) abort - if &number - let &cursorline = a:v - endif -endfunction - function! dead#functions#JumpToNextHeading(direction, count) let col = col('.') silent execute a:direction ==? 'up' ? '?^#' : '/^#' @@ -44,3 +32,10 @@ command! -bang -nargs=* GGrep \ call fzf#vim#grep( \ 'git grep --line-number '.shellescape(), 0, \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), 0) + +function! dead#functions#FormatFile() + let b:PlugView=winsaveview() + exe 'silent normal! gg=G' + call winrestview(b:PlugView) + echo 'file indented' +endfunction diff --git a/.config/nvim/autoload/dead/statusline.vim b/.config/nvim/autoload/dead/statusline.vim index 1fbae11..321b7e7 100644 --- a/.config/nvim/autoload/dead/statusline.vim +++ b/.config/nvim/autoload/dead/statusline.vim @@ -8,14 +8,14 @@ endfunction function! dead#statusline#StatusLine() abort let l:statusline='' - 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.='%#User9#%p%% โ˜ฐ %l:%c ' let l:statusline.=dead#statusline#ModeColor() let l:statusline.=dead#statusline#CurrentMode() + let l:statusline.=' %#User9#%p%% = %l:%c' + let l:statusline.=' %#User8#%{fugitive#head()} ' + let l:statusline.='%= ' + let l:statusline.='%#User7#%{GitStatus()} ' + let l:statusline.='%#User9#%m %f' + let l:statusline.='%{dead#statusline#LinePasteMode()}' return l:statusline endfunction @@ -69,8 +69,7 @@ function! GitStatus() abort if !get(g:, 'gitgutter_enabled', 0) || empty(FugitiveHead()) return '' endif - let [ l:added, l:modified, l:removed ] = GitGutterGetHunkSummary() - return printf('+%d ~%d -%d', l:added, l:modified, l:removed) + return join(filter(map(['A','M','D'], {i,v -> v.': '.GitGutterGetHunkSummary()[i]}), 'v:val[-1:]'), ' ') endfunction let g:modes={ diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json index 31735a3..2e64309 100644 --- a/.config/nvim/coc-settings.json +++ b/.config/nvim/coc-settings.json @@ -1,4 +1,21 @@ { + "languageserver": { + "efm": { + "command": "efm-langserver", + "args": [], + // custom config path + // "args": ["-c", "/path/to/your/config.yaml"], + "filetypes": [ + "vim", + "html", + "sh", + "javascript", + "css", + "markdown", + "yaml" + ] + } + }, "coc.preferences.formatOnSaveFiletypes": [ "javascript", "html", @@ -8,32 +25,32 @@ "sh" ], "codeLens.enable": true, - "diagnostic.errorSign": "๐—", - "diagnostic.warningSign": "โžค", + "diagnostic.errorSign": "X", + "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 ` for specifying indentation) - // should be split into two strings, the flag and then the value - "args": ["-p", "-ci", "-sr"] - } - }, + /* "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 ` 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, @@ -43,10 +60,7 @@ "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, diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 60e3eea..1f8d757 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,19 +1,29 @@ -let g:loaded_python_provider=1 " Disable python 2 interface -let g:python_host_skip_check=1 " Skip python 2 host check +let g:loaded_python_provider = 0 +let g:loaded_ruby_provider = 0 +let g:loaded_node_provider = 0 +let g:loaded_gzip = 1 +let g:loaded_tarPlugin = 1 +let g:loaded_zipPlugin = 1 +let g:loaded_2html_plugin = 1 + if filereadable('bin/python3') let g:python3_host_prog = '/bin/python3' 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') set grepprg=rg\ --vimgrep set grepformat=%f:%l:%c:%m +else + set grepprg=grep\ -R\ -n\ --exclude-dir=.git,.cache endif + if empty(glob('~/.local/share/nvim/site/autoload/plug.vim')) silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync | call coc#util#install() | source $MYVIMRC + aug Plugins + au! + au VimEnter * PlugInstall --sync | call coc#util#install() | source $MYVIMRC + aug END endif if has('nvim') @@ -23,24 +33,28 @@ endif let mapleader="\" let maplocalleader=',' -set termguicolors -aug colores - au! - au ColorScheme * call dead#colores#Barra() - au ColorScheme * call dead#colores#Maquillaje() -aug END -let g:srcery_transparent_background = 1 -let g:srcery_italic = 1 -let g:srcery_inverse_matches = 1 -let g:srcery_underline = 1 +if exists('$DISPLAY') + aug Colores + au! + au ColorScheme * call dead#colores#Barra() + au ColorScheme * call dead#colores#Maquillaje() + aug END + set termguicolors + 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_undercurl = 1 +endif let g:srcery_underline_match_paren = 1 -let g:srcery_undercurl = 1 colorscheme srcery +set tabline=%!dead#tabline#Tabline() + if filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim')) call plug#begin(stdpath('data') . '/plugged') Plug 'lervag/vimtex', {'for': 'latex'} - Plug 'neoclide/coc.nvim', {'branch': 'release', 'for': ['javascript', 'html', 'css', 'json', 'jsonc', 'typescript', 'jsx', 'tsx', 'sh', 'vim']} + Plug 'neoclide/coc.nvim', {'branch': 'release', 'for': ['javascript', 'html', 'css', 'json', 'jsonc', 'sh', 'vim']} Plug 'fatih/vim-go', {'for': 'go', 'do': ':GoInstallBinaries'} Plug 'tpope/vim-fugitive' Plug 'airblade/vim-gitgutter' diff --git a/.config/nvim/plugin/autocmds.vim b/.config/nvim/plugin/autocmds.vim index e4c48df..197a29d 100644 --- a/.config/nvim/plugin/autocmds.vim +++ b/.config/nvim/plugin/autocmds.vim @@ -2,13 +2,13 @@ scriptencoding utf-8 if !exists('autocommands_loaded') && has('autocmd') let autocommands_loaded = 1 - let ftToIgnore = ['markdown', 'html'] + let ftToIgnore = ['markdown', 'html', 'text'] + let noNumbers = ['markdown', 'help', 'text'] aug OnInsert - au BufWinEnter,FocusGained,InsertLeave,WinEnter * call dead#functions#Relativize(1) - au BufWinLeave,FocusLost,InsertEnter,WinLeave * call dead#functions#Relativize(0) - au InsertEnter * setlocal relativenumber - au InsertLeave * setlocal nopaste norelativenumber + au BufWinEnter,FocusGained,InsertLeave,WinEnter * if index(noNumbers, &ft) < 0 | setlocal cursorline norelativenumber + au BufWinLeave,FocusLost,InsertEnter,WinLeave * if index(noNumbers, &ft) < 0 | setlocal nocursorline relativenumber + au InsertLeave * if &paste | setlocal nopaste | endif au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif aug END @@ -27,16 +27,6 @@ if !exists('autocommands_loaded') && has('autocmd') au BufWritePre * if index(ftToIgnore, &ft) < 0 | :%s/\s\+$//e au BufWritePost *xresources !xrdb % au BufWritePost *sxhkdrc !pkill -USR1 sxhkd - au BufWritePost *.tex !pdflatex % au QuitPre * if empty(&buftype) | lclose | endif aug END - - aug MyTerminal - au TermOpen * setlocal wrap nonumber norelativenumber noruler signcolumn=no - 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 - aug END endif diff --git a/.config/nvim/plugin/gitgutter.vim b/.config/nvim/plugin/gitgutter.vim index ef64c40..851a7c8 100644 --- a/.config/nvim/plugin/gitgutter.vim +++ b/.config/nvim/plugin/gitgutter.vim @@ -6,3 +6,9 @@ let g:gitgutter_set_sign_backgrounds = 1 let g:gitgutter_grep = 'rg --color=never' let g:fugitive_summary_format = "%an\t%s" + +nmap {g (GitGutterPrevHunk)zz +nmap }g (GitGutterNextHunk)zz +nmap + (GitGutterStageHunk) +nmap - (GitGutterUndoHunk) +nmap p (GitGutterPreviewHunk) diff --git a/.config/nvim/plugin/settings.vim b/.config/nvim/plugin/settings.vim index f5c9050..acf20a8 100644 --- a/.config/nvim/plugin/settings.vim +++ b/.config/nvim/plugin/settings.vim @@ -5,8 +5,7 @@ set inccommand=nosplit set clipboard^=unnamedplus set number set noshowmode -set noshowcmd -set showtabline=0 +set signcolumn=auto:1 set noswapfile set hidden set lazyredraw @@ -36,7 +35,6 @@ set diffopt+=algorithm:histogram,indent-heuristic set diffopt+=foldcolumn:0 set diffopt+=vertical set fillchars=diff:\ ,eob:\ ,stlnc:\ ,stl:\ ,vert:\โ”‚ -set formatoptions+=n -set formatoptions-=crot +set formatoptions=tnqj let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*' match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index c5152ad..030cf50 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -36,12 +36,12 @@ set -g pane-border-style fg=colour0,dim set -g pane-active-border-style fg=colour0,dim set -g set-titles on set -g status-interval 60 -set -g mode-style 'fg=#EEEEEE,bg=#75507B' +set -g mode-style 'fg=#EEEEEE,bg=colour100' set -g message-command-style bg=colour0,fg=colour13 -set -g message-style 'bg=#222222,fg=white,italics' -set -g status-style "bg=#080808,fg=#999999" -set -g status-left '#[fg=#555555]#S: ' -set -g status-right '#(txbar) #[fg=colour134]%a %d #[fg=colour167]%R' +set -g message-style 'bg=colour233,fg=white,italics' +set -g status-style "bg=#080808,fg=colour248" +set -g status-left '#[fg=colour238]#S: ' +set -g status-right '#(txbar) #[fg=colour13]%a %d #[fg=colour2]%R' set -g window-status-separator ' ' set -g window-status-current-style bg=default,fg=colour3 set -g window-status-activity-style bg=default,fg=colour15,italics diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 64ed40f..a105967 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -25,7 +25,7 @@ setopt MULTIOS # Write to multiple descriptors. setopt AUTO_PARAM_SLASH # Tab completing directory appends a slash setopt PROMPT_SUBST -hash tmux 2>/dev/null && source "${ZDOTDIR}"/tmux.zsh +# hash tmux 2>/dev/null && source "${ZDOTDIR}"/tmux.zsh foreach programa ( doc/fzf/completion.zsh diff --git a/.config/zsh/conf/00_prompt.zsh b/.config/zsh/conf/00_prompt.zsh index 645a19b..4e6d855 100644 --- a/.config/zsh/conf/00_prompt.zsh +++ b/.config/zsh/conf/00_prompt.zsh @@ -6,6 +6,13 @@ function precmd() { fi } +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +setopt prompt_subst +zstyle ':vcs_info:git:*' formats '%b' +zstyle ':vcs_info:*' enable git + function () { if [[ $EUID == 0 ]]; then local SUFFIX='%(?,%F{yellow},%F{red})%n%f:' @@ -14,7 +21,7 @@ function () { fi PS1="%B${SUFFIX}%b " - export RPS1="%B%(?..%{%F{red}%}(%?%)%{%f%}) %b%F{12}%2~%f" + export RPS1="%F{green}\$vcs_info_msg_0_%f %B%(?..%{%F{red}%}(%?%)%{%f%}) %b%F{12}%2~%f" } export SPROMPT="zsh: correct %F{red}'%R'%f to %F{green}'%r'%f [%B%Uy%u%bes, %B%Un%u%bo, %B%Ue%u%bdit, %B%Ua%u%bbort]? " diff --git a/.config/zsh/conf/03_aliases.zsh b/.config/zsh/conf/03_aliases.zsh index 8729de5..1866091 100644 --- a/.config/zsh/conf/03_aliases.zsh +++ b/.config/zsh/conf/03_aliases.zsh @@ -15,7 +15,9 @@ alias \ ttx='txtnish timeline' \ ytv='straw-viewer' \ vdf='nvim -d' \ + sxiv='sxiv-rifle' \ play='mpd && ncmpcpp' \ + mumble='barnard -certificate ~g./barnard/dgy.pem -insecure -password Texto-plano' \ pyserv='python -m http.server' # XBPS @@ -92,13 +94,14 @@ alias \ ping='ping -c 5' \ dd='dd status=progress' \ dfc='dfc -dmT' \ - wget="wget --no-hsts" + wget="wget --no-hsts" \ + links="links -g" # Comandos alias \ sudo='doas ' \ - reboot='doas reboot' \ - shutdown='doas shutdown -h now' \ + reboot='loginctl reboot' \ + shutdown='loginctl poweroff' \ path='echo -e ${PATH//:/\\n}' \ wp='sxiv-rifle ~/img/wallpaper >/dev/null 2>&1' \ pwn='chmod +x' \ diff --git a/.config/zsh/conf/11_lf-icons.zsh b/.config/zsh/conf/11_lf-icons.zsh index 28b0cae..4d294b2 100644 --- a/.config/zsh/conf/11_lf-icons.zsh +++ b/.config/zsh/conf/11_lf-icons.zsh @@ -1,230 +1,232 @@ -export LF_ICONS="\ -di=๏“ :\ -fi=๎˜’ :\ -ln=๏‚ :\ -or=๏‚‹ :\ -ex=๏กš :\ -.git=๏‡“ :\ -Desktop=๏„ˆ :\ -Documents=๏…› :\ -Downloads=๏ฃ :\ -Music=๏€ :\ -Pictures=๏€ฐ :\ -Public=๏€‡ :\ -Templates=๏ƒ… :\ -Videos=๏€ฝ :\ -mail=๏ƒ  :\ -.mail=๏ƒ  :\ -.cache=๏€— :\ -.config=๏‚ญ :\ -trash=๏‡ธ :\ -Trash=๏‡ธ :\ -bin=๏„ฎ :\ -hexagons=๏‡‘ :\ -xresources=๏œ› :\ -xinitrc=๏œ› :\ -.bashprofile=๏Šพ :\ -.zprofile=๏Šพ :\ -.bashrc=๏’‰ :\ -.zshrc=๏’‰ :\ -.zshenv=๏‚ฌ :\ -.dmrc=๎˜• :\ -.ds_store=๏…น :\ -.fasd=๎˜• :\ -.gitconfig=๏‚› :\ -.gitignore=๏ž :\ -gitignore=๏ž :\ -.jack-settings=๏„ฐ :\ -.mime.types=๏€‹ :\ -.pam_environment=๎˜• :\ -.profile=๏†ƒ :\ -.recently-used=๏€— :\ -.selected_editor=๏€ :\ -.vimrc=๎Ÿ… :\ -config=๏‡ž :\ -exact-match-case-sensitive-1.txt=X1:\ -exact-match-case-sensitive-2=X2:\ -favicon.ico=๎˜ฃ :\ -gruntfile.coffee=๎˜‘ :\ -gruntfile.js=๎˜‘ :\ -gruntfile.ls=๎˜‘ :\ -gulpfile.coffee=๎˜ :\ -gulpfile.js=๎˜ :\ -gulpfile.ls=๎˜ :\ -ini=๏‡ž :\ -ledger=๏…• :\ -mimeapps.list=๏ƒ‹ :\ -node_modules=๎œ˜ :\ -procfile=๎˜‡ :\ -react.jsx=๎˜ฅ :\ -user-dirs.dirs=๏‚ฑ :\ -Makefile=๏ƒ‹ :\ -TODO=๏’  :\ -LICENSE=๏’• :\ -COPYING=๏‰ :\ -*.vim=๎˜ซ :\ -*.dmg=๏…น :\ -*.toml=๏’‡ :\ -*.m3u=๏‡‡ :\ -*.pls=๏‡‡ :\ -*.woff=๐‘พ:\ -*.woff2=๐‘พ:\ -*.eot=๐‘ฌ:\ -*.yaml=๏†ž :\ -*.yml=๏†ž :\ -*.wad=๏ฐ :\ -*.WAD=๏ฐ :\ -*.pk3=๏‡ข :\ -*.doc=๏‡‚ :\ -*.docx=๏‡‚ :\ -*.webp=๏ :\ -*.bib=๏ฌœ :\ -*.7z=๏ฆ :\ -*.ai=๎žด :\ -*.apk=๎œŽ :\ -*.avi=๏€ˆ :\ -*.bat=๏„  :\ -*.bmp=๏€พ :\ -*.bz2=๏ฆ :\ -*.c=๎˜ž :\ -*.c++=๎˜ :\ -*.cab=๏…บ :\ -*.cbr=๏ต :\ -*.cbz=๏ต :\ -*.cc=๎˜ :\ -*.clj=๎จ :\ -*.cljc=๎จ :\ -*.cljs=๎ช :\ -*.coffee=๎˜› :\ -*.conf=๏‘ข :\ -*.cp=๎˜ :\ -*.cpio=๏ฆ :\ -*.cpp=๎˜ :\ -*.css=๏ › :\ -*.cxx=๎˜ :\ -*.d=๎žฏ :\ -*.dart=๎ž˜ :\ -*.db=๎œ† :\ -*.deb=๏Œ† :\ -*.diff=๎œจ :\ -*.dump=๎œ† :\ -*.edn=๎ช :\ -*.ejs=๎˜Ž :\ -*.epub=๏€ญ :\ -*.erl=๎žฑ :\ -*.exe=๏…บ :\ -*.f#=๎žง :\ -*.fish=๏„  :\ -*.flac=๏€จ :\ -*.flv=๏€ˆ :\ -*.fs=๎žง :\ -*.fsi=๎žง :\ -*.fsscript=๎žง :\ -*.fsx=๎žง :\ -*.gem=๎ˆพ :\ -*.gif=๏€พ :\ -*.go=๎˜ง :\ -*.gz=๏ฆ :\ -*.gzip=๏ฆ :\ -*.hbs=๎˜ :\ -*.hrl=๎žฑ :\ -*.hs=๎˜Ÿ :\ -*.htm=๏ œ :\ -*.html=๏ œ :\ -*.ico=๏€พ :\ -*.ini=๏‘ข :\ -*.java=๎œธ :\ -*.jl=๎˜ค :\ -*.jpeg=๏€พ :\ -*.jpg=๏€พ :\ -*.js=๎˜Œ :\ -*.json=๎˜‹ :\ -*.jsx=๎žบ :\ -*.less=๎˜” :\ -*.lha=๏ฆ :\ -*.lhs=๎˜Ÿ :\ -*.log=๏‡ช :\ -*.lua=๎˜  :\ -*.lzh=๏ฆ :\ -*.lzma=๏ฆ :\ -*.m4a=๏€จ :\ -*.markdown=๏’Š :\ -*.md=๏’Š :\ -*.mkv=๏€ˆ :\ -*.ml=ฮป:\ -*.mli=ฮป:\ -*.mov=๏€ˆ :\ -*.mp3=๏€จ :\ -*.mp4=๏€ˆ :\ -*.mpeg=๏€ˆ :\ -*.mpg=๏€ˆ :\ -*.mustache=๎˜ :\ -*.ogg=๏€จ :\ -*.pdf=๏‡ :\ -*.php=๎˜ˆ :\ -*.pl=๎ฉ :\ -*.pm=๎ฉ :\ -*.png=๏€พ :\ -*.psb=๎žธ :\ -*.psd=๎žธ :\ -*.py=๎˜† :\ -*.pyc=๎˜† :\ -*.pyd=๎˜† :\ -*.pyo=๎˜† :\ -*.rar=๏ฆ :\ -*.rb=๎ž‘ :\ -*.rc=๏‘ข :\ -*.rlib=๎žจ :\ -*.rpm=๏Œ– :\ -*.rs=๎žจ :\ -*.rss=๎˜™ :\ -*.scala=๎œท :\ -*.scss=๎˜ƒ :\ -*.sh=๏„  :\ -*.slim=๎˜Ž :\ -*.sln=๎œŒ :\ -*.sql=๎œ† :\ -*.styl=๎˜€ :\ -*.suo=๎œŒ :\ -*.t=๎ฉ :\ -*.tar=๏ฆ :\ -*.tgz=๏ฆ :\ -*.ts=๎˜จ :\ -*.twig=๎˜œ :\ -*.wav=๏€จ :\ -*.webm=๏€ˆ :\ -*.xml=๎˜Ž :\ -*.xul=๏‰ฉ :\ -*.xz=๏ฆ :\ -*.zip=๏ฆ :\ -*.zsh=๏„  :\ -*.kra=๏‡ผ :\ -*.xcf=๏—ข :\ -*.go=๎˜ง :\ -*.tex=๏† :\ -*.txt=๏…› :\ -*.lock=๏€ฃ :\ -*.h=๎˜ž :\ -*.o=๎˜ :\ -*.blend=๏–ช :\ -*.1=๏‘ฑ :\ -*.jar=๏ƒด :\ -*.desktop=๏„ˆ :\ -*.mk=๎ˆ :\ -*.torrent=๏ถ :\ -*.added=๏ถ :\ -*.pem=๏‚„ :\ -*.svg=๎œ :\ -*.scd=๏†ฒ :\ -*.theme=๏‡… :\ -*.iso=๎‰ฑ :\ -*.mid=๏ข† :\ -*.url=๏ƒ :\ -*.part=๏ƒญ :\ -*.nfo=๏„ฉ :\ -*.pd=๏ƒจ :\ -*.ttf=๏’ž :\ -*.otf=๏’ž :\ -*.bdf=๏’ :\ -*.pcf=๏’ :\ -" +if [[ -n $DISPLAY ]]; then + export LF_ICONS="\ + di=๏“ :\ + fi=๎˜’ :\ + ln=๏‚ :\ + or=๏‚‹ :\ + ex=๏กš :\ + .git=๏‡“ :\ + Desktop=๏„ˆ :\ + Documents=๏…› :\ + Downloads=๏ฃ :\ + Music=๏€ :\ + Pictures=๏€ฐ :\ + Public=๏€‡ :\ + Templates=๏ƒ… :\ + Videos=๏€ฝ :\ + mail=๏ƒ  :\ + .mail=๏ƒ  :\ + .cache=๏€— :\ + .config=๏‚ญ :\ + trash=๏‡ธ :\ + Trash=๏‡ธ :\ + bin=๏„ฎ :\ + hexagons=๏‡‘ :\ + xresources=๏œ› :\ + xinitrc=๏œ› :\ + .bashprofile=๏Šพ :\ + .zprofile=๏Šพ :\ + .bashrc=๏’‰ :\ + .zshrc=๏’‰ :\ + .zshenv=๏‚ฌ :\ + .dmrc=๎˜• :\ + .ds_store=๏…น :\ + .fasd=๎˜• :\ + .gitconfig=๏‚› :\ + .gitignore=๏ž :\ + gitignore=๏ž :\ + .jack-settings=๏„ฐ :\ + .mime.types=๏€‹ :\ + .pam_environment=๎˜• :\ + .profile=๏†ƒ :\ + .recently-used=๏€— :\ + .selected_editor=๏€ :\ + .vimrc=๎Ÿ… :\ + config=๏‡ž :\ + exact-match-case-sensitive-1.txt=X1:\ + exact-match-case-sensitive-2=X2:\ + favicon.ico=๎˜ฃ :\ + gruntfile.coffee=๎˜‘ :\ + gruntfile.js=๎˜‘ :\ + gruntfile.ls=๎˜‘ :\ + gulpfile.coffee=๎˜ :\ + gulpfile.js=๎˜ :\ + gulpfile.ls=๎˜ :\ + ini=๏‡ž :\ + ledger=๏…• :\ + mimeapps.list=๏ƒ‹ :\ + node_modules=๎œ˜ :\ + procfile=๎˜‡ :\ + react.jsx=๎˜ฅ :\ + user-dirs.dirs=๏‚ฑ :\ + Makefile=๏ƒ‹ :\ + TODO=๏’  :\ + LICENSE=๏’• :\ + COPYING=๏‰ :\ + *.vim=๎˜ซ :\ + *.dmg=๏…น :\ + *.toml=๏’‡ :\ + *.m3u=๏‡‡ :\ + *.pls=๏‡‡ :\ + *.woff=๐‘พ:\ + *.woff2=๐‘พ:\ + *.eot=๐‘ฌ:\ + *.yaml=๏†ž :\ + *.yml=๏†ž :\ + *.wad=๏ฐ :\ + *.WAD=๏ฐ :\ + *.pk3=๏‡ข :\ + *.doc=๏‡‚ :\ + *.docx=๏‡‚ :\ + *.webp=๏ :\ + *.bib=๏ฌœ :\ + *.7z=๏ฆ :\ + *.ai=๎žด :\ + *.apk=๎œŽ :\ + *.avi=๏€ˆ :\ + *.bat=๏„  :\ + *.bmp=๏€พ :\ + *.bz2=๏ฆ :\ + *.c=๎˜ž :\ + *.c++=๎˜ :\ + *.cab=๏…บ :\ + *.cbr=๏ต :\ + *.cbz=๏ต :\ + *.cc=๎˜ :\ + *.clj=๎จ :\ + *.cljc=๎จ :\ + *.cljs=๎ช :\ + *.coffee=๎˜› :\ + *.conf=๏‘ข :\ + *.cp=๎˜ :\ + *.cpio=๏ฆ :\ + *.cpp=๎˜ :\ + *.css=๏ › :\ + *.cxx=๎˜ :\ + *.d=๎žฏ :\ + *.dart=๎ž˜ :\ + *.db=๎œ† :\ + *.deb=๏Œ† :\ + *.diff=๎œจ :\ + *.dump=๎œ† :\ + *.edn=๎ช :\ + *.ejs=๎˜Ž :\ + *.epub=๏€ญ :\ + *.erl=๎žฑ :\ + *.exe=๏…บ :\ + *.f#=๎žง :\ + *.fish=๏„  :\ + *.flac=๏€จ :\ + *.flv=๏€ˆ :\ + *.fs=๎žง :\ + *.fsi=๎žง :\ + *.fsscript=๎žง :\ + *.fsx=๎žง :\ + *.gem=๎ˆพ :\ + *.gif=๏€พ :\ + *.go=๎˜ง :\ + *.gz=๏ฆ :\ + *.gzip=๏ฆ :\ + *.hbs=๎˜ :\ + *.hrl=๎žฑ :\ + *.hs=๎˜Ÿ :\ + *.htm=๏ œ :\ + *.html=๏ œ :\ + *.ico=๏€พ :\ + *.ini=๏‘ข :\ + *.java=๎œธ :\ + *.jl=๎˜ค :\ + *.jpeg=๏€พ :\ + *.jpg=๏€พ :\ + *.js=๎˜Œ :\ + *.json=๎˜‹ :\ + *.jsx=๎žบ :\ + *.less=๎˜” :\ + *.lha=๏ฆ :\ + *.lhs=๎˜Ÿ :\ + *.log=๏‡ช :\ + *.lua=๎˜  :\ + *.lzh=๏ฆ :\ + *.lzma=๏ฆ :\ + *.m4a=๏€จ :\ + *.markdown=๏’Š :\ + *.md=๏’Š :\ + *.mkv=๏€ˆ :\ + *.ml=ฮป:\ + *.mli=ฮป:\ + *.mov=๏€ˆ :\ + *.mp3=๏€จ :\ + *.mp4=๏€ˆ :\ + *.mpeg=๏€ˆ :\ + *.mpg=๏€ˆ :\ + *.mustache=๎˜ :\ + *.ogg=๏€จ :\ + *.pdf=๏‡ :\ + *.php=๎˜ˆ :\ + *.pl=๎ฉ :\ + *.pm=๎ฉ :\ + *.png=๏€พ :\ + *.psb=๎žธ :\ + *.psd=๎žธ :\ + *.py=๎˜† :\ + *.pyc=๎˜† :\ + *.pyd=๎˜† :\ + *.pyo=๎˜† :\ + *.rar=๏ฆ :\ + *.rb=๎ž‘ :\ + *.rc=๏‘ข :\ + *.rlib=๎žจ :\ + *.rpm=๏Œ– :\ + *.rs=๎žจ :\ + *.rss=๎˜™ :\ + *.scala=๎œท :\ + *.scss=๎˜ƒ :\ + *.sh=๏„  :\ + *.slim=๎˜Ž :\ + *.sln=๎œŒ :\ + *.sql=๎œ† :\ + *.styl=๎˜€ :\ + *.suo=๎œŒ :\ + *.t=๎ฉ :\ + *.tar=๏ฆ :\ + *.tgz=๏ฆ :\ + *.ts=๎˜จ :\ + *.twig=๎˜œ :\ + *.wav=๏€จ :\ + *.webm=๏€ˆ :\ + *.xml=๎˜Ž :\ + *.xul=๏‰ฉ :\ + *.xz=๏ฆ :\ + *.zip=๏ฆ :\ + *.zsh=๏„  :\ + *.kra=๏‡ผ :\ + *.xcf=๏—ข :\ + *.go=๎˜ง :\ + *.tex=๏† :\ + *.txt=๏…› :\ + *.lock=๏€ฃ :\ + *.h=๎˜ž :\ + *.o=๎˜ :\ + *.blend=๏–ช :\ + *.1=๏‘ฑ :\ + *.jar=๏ƒด :\ + *.desktop=๏„ˆ :\ + *.mk=๎ˆ :\ + *.torrent=๏ถ :\ + *.added=๏ถ :\ + *.pem=๏‚„ :\ + *.svg=๎œ :\ + *.scd=๏†ฒ :\ + *.theme=๏‡… :\ + *.iso=๎‰ฑ :\ + *.mid=๏ข† :\ + *.url=๏ƒ :\ + *.part=๏ƒญ :\ + *.nfo=๏„ฉ :\ + *.pd=๏ƒจ :\ + *.ttf=๏’ž :\ + *.otf=๏’ž :\ + *.bdf=๏’ :\ + *.pcf=๏’ :\ + " +fi diff --git a/.config/zsh/tmux.zsh b/.config/zsh/tmux.zsh index 815b16c..51f98f6 100644 --- a/.config/zsh/tmux.zsh +++ b/.config/zsh/tmux.zsh @@ -42,7 +42,8 @@ tmux_sessions() { } tmux_base_session(){ -client_cnt="$(tmux list-clients | wc -l 2>/dev/null)" +# create base session, then prompt for others +client_cnt="$(tmux list-clients 2>/dev/null | wc -l)" if [[ $client_cnt -eq 0 ]]; then tmux new-session -d -s z tmux attach-session -t z diff --git a/.local/bin/minve b/.local/bin/minve index c6a8c00..170aed2 100755 --- a/.local/bin/minve +++ b/.local/bin/minve @@ -17,13 +17,13 @@ case $1 in echo "$focusedNode $focusedID $focusedName" >> "$file" xdo hide "$focusedNode" notiflines="$((lines + 1))" - notify-send -i "$icon" "${notiflines} ventanas escondidas." "$focusedName" + [ "$notiflines" -gt 1 ] && notiftext="ventanas escondidas" || notiftext="ventana escondida" + notify-send -i "$icon" "${notiflines} $notiftext." "$focusedName" fi ;; show) [ -z "$file" ] && exit - - sel=$(awk '{print $2,$3}' "$file" | rofi -dmenu -p '๏ฎ ') + [ "$lines" -eq 1 ] && sel=$(awk '{print $2,$3}' "$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" diff --git a/.local/bin/monis b/.local/bin/monis index 7d31881..dacb4e3 100755 --- a/.local/bin/monis +++ b/.local/bin/monis @@ -1,11 +1,13 @@ #!/bin/sh -conectados=$(xrandr | awk '( $2 == "connected" ) { count++ } END { print count }') +# conectados=$(xrandr | awk '( $2 == "connected" ) { count++ } END { print count }') pri=$(xrandr | awk '( $2 == "connected" ) {print $1}' | sed -sn 1p) sec=$(xrandr | awk '( $2 == "connected" ) {print $1}' | sed -sn 2p) -if [ "$conectados" = 1 ]; then - xrandr --output "$pri" --primary --auto --scale 1.0x1.0 "$(xrandr | awk '( $2 "disconnected" ) {print "--output", $1, "--off"}' | paste -sd ' ')" -elif [ "$conectados" = 2 ]; then - xrandr --output "$pri" --primary --auto --scale 1.0x1.0 --output "$sec" --right-of "$pri" --auto --scale 1.0x1.0 -fi +xrandr --output "$pri" --primary --auto --scale 1.0x1.0 --output "$sec" --right-of "$pri" --auto --scale 1.0x1.0 + +# if [ "$conectados" = 1 ]; then +# xrandr --output "$pri" --primary --auto --scale 1.0x1.0 "$(xrandr | awk '( $2 "disconnected" ) {print "--output", $1, "--off"}' | paste -sd ' ')" +# elif [ "$conectados" = 2 ]; then +# xrandr --output "$pri" --primary --auto --scale 1.0x1.0 --output "$sec" --right-of "$pri" --auto --scale 1.0x1.0 +# fi diff --git a/.local/bin/pantallazo b/.local/bin/pantallazo index 78e57f7..fac7bbf 100755 --- a/.local/bin/pantallazo +++ b/.local/bin/pantallazo @@ -9,15 +9,15 @@ notify() { } 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" ;; + "Seleccion") maim -us "$file" && notify ;; + "Ventana") maim -ui "$(printf "%d\n" $vent)" "$file" && notify ;; "Pantalla") conectados=$(xrandr | awk '( $2 == "connected" ) { count++ } END { print count }') if [ "$conectados" = 1 ]; then - maim -u "$file" + maim -u "$file" && notify elif [ "$conectados" = 2 ]; then moni="$(xrandr | awk '( $2 == "connected" ) { print $1 }' | rofi -dmenu -p "Pantalla")" - maim -u "$moni" "$file" + maim -u "$moni" "$file" && notify fi ;; "Copiar seleccion") maim -us | xclip -selection clipboard -t image/png && notify ;; diff --git a/.local/bin/txbar b/.local/bin/txbar index 516d285..5340738 100755 --- a/.local/bin/txbar +++ b/.local/bin/txbar @@ -1,8 +1,16 @@ #!/bin/sh -HEART='๏ˆž ' -WIFI='๏ชจ' -THERM='๏‹ˆ' +# if ! xset q &>/dev/null; then +if [ -z $DISPLAY ]; then + HEART='B' + WIFI='W ' + THERM='T' +else + HEART='๏ˆž ' + WIFI='๏ชจ' + THERM='๏‹ˆ' +fi + MAIL='@' if [ -d /sys/class/power_supply/BAT0 ]; then battery_info="$(head -n 1 /sys/class/power_supply/BAT0/capacity)%" @@ -10,14 +18,20 @@ if [ -d /sys/class/power_supply/BAT0 ]; then printf '#[fg=colour123] %s' "$HEART$current_charge" fi -if ping -q -w 1 -c 1 "$(ip r | awk '/default/ {print $3}')" >/dev/null; then - net="$(awk 'NR == 3 { print substr($3, 1, length($3) - 1) }' /proc/net/wireless)" - printf '#[fg=colour177] %s' "$WIFI$net" +unread="$(find "$XDG_DATA_HOME"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)" +if [ "$unread" -gt 0 ]; then + printf ' %s' "$MAIL$unread" fi +if [ "$(cat /sys/class/net/w*/operstate)" = up ]; then + net="$(awk '/^\s*w/ { print int($3 * 100 / 70) }' /proc/net/wireless)" + printf '#[fg=colour184] %s' "$WIFI$net" +fi + +# if ping -q -w 1 -c 1 "$(ip r | awk '/default/ {print $3}')" >/dev/null; then +# net="$(awk 'NR == 3 { print substr($3, 1, length($3) - 1) }' /proc/net/wireless)" +# printf '#[fg=colour184] %s' "$WIFI$net" +# fi + temp="$(sensors | awk '(/Core 0/){printf $3}' | sed 's/\.0//; s/+//')" printf '#[fg=default] %s' "$THERM $temp" - -# ip -o -4 a show dev tun0 | awk '{print $4}' -# ip -4 -br a | awk '/UP/ {print $3}' | cut -f1 -d'/' -# chequear tmux show-env|grep ^SSH_CONNECTION=|cut -d= -f2|cut -d" " -f1 o tmux show-env|sed -n "/^SSH_CONNECTION=/{s/[^=]*=//;s/ .*//;p;} y usar eso como condicion? diff --git a/.zshenv b/.zshenv index 746426f..d05ee6b 100644 --- a/.zshenv +++ b/.zshenv @@ -5,12 +5,12 @@ else export EDITOR="nvim" fi -export EXINIT="set ai ic nu sm smd" +export EXINIT="set ai ic nu sm smd sw=4 ts=4 ruler searchincr para=BlBdPpIt sect=ShSs | map gg 1G" export VISUAL="$EDITOR" export GIT_EDITOR="$EDITOR" export TERMINAL="alacritty" -export BROWSER="${${DISPLAY:-elinks}:+firefox}" export COLORTERM="truecolor" +export BROWSER="${${DISPLAY:-links}:+firefox}" export OPENER="xdg-open" export PAGER="less" export FILE="lf" @@ -57,11 +57,11 @@ export FZF_DEFAULT_OPTS="--cycle \ --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 \ + --info=inline \ --no-bold \ --ansi \ - --pointer='๐Ÿกข' \ - --marker='โฆ ' \ + --pointer='โ†’' \ + --marker='โˆ™' \ --preview-window :wrap:sharp" export FZF_DEFAULT_COMMAND="fd -t f -c always -H" @@ -72,11 +72,12 @@ export FZF_VIM_LOG=$(git config --get alias.l | awk '{$1=""; print $0;}' | tr -d # }}} # Less {{{ export LESSCHARSET=UTF-8 -export LESS=-MR -export LESS_TERMCAP_mb="$(printf '%b' '')" -export LESS_TERMCAP_md="$(printf '%b' '')" +# export LESS=-MR +export LESS=FRXix4 +export LESS_TERMCAP_mb="$(printf '%b' '')" +export LESS_TERMCAP_md="$(printf '%b' '')" export LESS_TERMCAP_me="$(printf '%b' '')" -export LESS_TERMCAP_so="$(printf '%b' '')" +export LESS_TERMCAP_so="$(printf '%b' '')" export LESS_TERMCAP_se="$(printf '%b' '')" export LESS_TERMCAP_us="$(printf '%b' '')" export LESS_TERMCAP_ue="$(printf '%b' '')" diff --git a/doc/xbpaketes b/doc/xbpaketes index da03dc0..11c5b6f 100644 --- a/doc/xbpaketes +++ b/doc/xbpaketes @@ -25,12 +25,16 @@ dunst elinks elogind faac +fbgrab +fbpdf fd ffmpeg ffmpeg-devel figlet file-roller firefox +font-b612 +font-hermit-otf fontconfig-devel freepats fzf @@ -67,6 +71,7 @@ libressl-devel librsvg librsvg-utils libva-intel-driver +links lm_sensors love maim @@ -77,6 +82,7 @@ mpc mpd mpv msmtp +musikcube ncmpcpp ncurses-devel ncurses-term @@ -84,7 +90,6 @@ neomutt neovim neovim-remote newsboat -nfs-utils nicotine+ ninja nodejs @@ -102,7 +107,6 @@ pinentry-tty pkg-config polkit powertop -pulseaudio pulsemixer python3 python3-pip @@ -110,6 +114,7 @@ qjackctl ripgrep rkhunter rofi +sct setxkbmap shellcheck shfmt @@ -122,6 +127,7 @@ sxiv texlive-bin thermald tmux +tnftp toilet transmission tremc @@ -146,6 +152,7 @@ xrdb xset xsetroot xss-lock +xterm xtitle xtools xz