diff --git a/.config/X11/xresources b/.config/X11/xresources index 3913fc5..3b4ee34 100644 --- a/.config/X11/xresources +++ b/.config/X11/xresources @@ -35,9 +35,9 @@ *.color7: #a89984 *.color15: #ffffff -dmenu.font: System Charcoal:pixelsize=16:antialias=true:autohint=true; -dmenu.background: #d8d8d8 -dmenu.foreground: #380000 +dmenu.font: System Charcoal:pixelsize=15:antialias=true:autohint=true; +dmenu.background: #080808 +dmenu.foreground: #b3b1ad dmenu.selbackground: #fccb00 dmenu.selforeground: #380000 diff --git a/.config/alacritty.yml b/.config/alacritty.yml index b59e6bf..6fbf84c 100644 --- a/.config/alacritty.yml +++ b/.config/alacritty.yml @@ -1,14 +1,12 @@ window: dimensions: - columns: 80 - lines: 25 + columns: 140 + lines: 30 padding: - x: 15 + x: 10 y: 5 - # decorations: none - dynamic_title: true scrolling: @@ -35,7 +33,13 @@ font: # as modifying the line spacing, and `offset.x` as modifying the letter spacing. offset: x: 0 - y: 1 + y: 0 + + glyph_offset: + x: 0 + y: 0 + + use_thin_strokes: true draw_bold_text_with_bright_colors: false diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index c725431..f0eb982 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -1,10 +1,10 @@ #!/bin/sh -bspc rule -r "*" - bspmonis & randbg & +bspc rule -r "*" + bspc config border_width 2 bspc config window_gap 6 bspc config top_padding 5 @@ -44,8 +44,7 @@ bspc config active_border_color "$(get_xrdb color8)" bspc config presel_feedback_color "$(get_xrdb color6)" # Flotantes -bspc rule -a Catia state=floating -bspc rule -a Cadence state=floating +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 diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 8ba5151..3dc649a 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -272,6 +272,7 @@ map za $apack "$f".zip $f map zu $file-roller "$f" map zx $atool --each --extract "$f" map zg $hx add $fs +map zf $hx add $fs . map zn newfold map i push A # at the very beginning diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf index c24ad9b..9c4fad5 100644 --- a/.config/mpd/mpd.conf +++ b/.config/mpd/mpd.conf @@ -11,6 +11,14 @@ audio_output { name "Pulse Audio" } +#audio_output { +# type "alsa" +# name "ALSA sound card" +# # Optional +# #device "iec958:CARD=Intel,DEV=0" +# #mixer_control "PCM" +#} + audio_output { type "fifo" name "Visualizer" diff --git a/.config/neomutt/mailcap b/.config/neomutt/mailcap index 5d54898..68c7483 100644 --- a/.config/neomutt/mailcap +++ b/.config/neomutt/mailcap @@ -4,8 +4,8 @@ text/html; elinks -no-connect -dump -dump-charset UTF-8 -dump-width 140 -default text/x-diff; colordiff; copiousoutput text/x-patch; colordiff; copiousoutput image/*; openfile %s ; -video/*; setsid mpv --quiet %s &; copiousoutput +video/*; setsid mpv --quiet--keep-open - audio/*; mpv %s ; -application/pdf; openfile %s ; +application/pdf; zathura --fork - && sleep 1; test=test -n "$DISPLAY" application/pgp-encrypted; gpg -d '%s'; copiousoutput; application/pgp-keys; gpg --import '%s'; copiousoutput; diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc index 3c6cd1d..8a4e2e1 100644 --- a/.config/neomutt/neomuttrc +++ b/.config/neomutt/neomuttrc @@ -8,11 +8,13 @@ unset help 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 send_charset = "utf-8" set forward_format = "Fwd: %s" # Format of subject when forwarding set sleep_time = 0 # Pause 0 seconds for informational messages set mail_check = 60 # To avoid lags using IMAP @@ -27,12 +29,14 @@ 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 set wait_key = no # mutt won't ask "press key to continue" +set recall = no # that's what R keybind is for 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 @@ -60,12 +64,6 @@ unhdr_order * unignore from subject to cc date x-mailer x-url user-agent hdr_order date from to cc subject -index-format-hook date "~d<1d" "Today" -index-format-hook date "~d<2d" "Yesterday" -index-format-hook date "~d<1w" "%[%A]" -index-format-hook date "~d<1y" "%[%b %d]" -index-format-hook date "~A" "%[%b %y]" - # 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" diff --git a/.config/neomutt/neomuttrc.d/powerline.neomuttrc b/.config/neomutt/neomuttrc.d/powerline.neomuttrc index b2cb268..e1494eb 100644 --- a/.config/neomutt/neomuttrc.d/powerline.neomuttrc +++ b/.config/neomutt/neomuttrc.d/powerline.neomuttrc @@ -1,12 +1,12 @@ # vim: filetype=neomuttrc -# ---------------------------------------------------------------------------- # Powerline / nerdfont # This is a bit "hackish" due to neomutt limitations # -# Author: Sheoak -# ---------------------------------------------------------------------------- -set index_format=" %zs %zc %zt %{!%F %R} %-28.28L %?M?(%1M)& ? %?X?& ? %s" +# Author: Sheoak https://github.com/sheoak/neomutt-powerline-nerdfonts + +set index_format=" %zs %zc %zt %<[y?%<[m?%<[d?%[%R ]&%[%a %d]>&%[%b %d]>&%[%F ]> %-28.28L %?M?(%1M)& ? %?X?& ? %s" + 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" diff --git a/.config/nvim/after/ftplugin/go.vim b/.config/nvim/after/ftplugin/go.vim new file mode 100644 index 0000000..f421b96 --- /dev/null +++ b/.config/nvim/after/ftplugin/go.vim @@ -0,0 +1,36 @@ +setlocal noexpandtab +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal foldmethod=syntax + +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_fmt_command = "goimports" +let g:go_list_type = "quickfix" + +" Go syntax highlighting +let g:go_highlight_fields = 1 +let g:go_highlight_functions = 1 +let g:go_highlight_function_calls = 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 + +" Add the failing test name to the output of :GoTest +let g:go_test_show_name = 1 + +let b:ale_linters = ['gopls'] + +inoremap . . +nmap t :GoTest! +nmap v :GoVet! +nmap b :GoBuild! +nmap i :GoInstall! +nmap l :GoMetaLinter! +nmap r :GoRun % +nmap d :GoDebugStart! +nmap r :GoRun! diff --git a/.config/nvim/after/ftplugin/html.vim b/.config/nvim/after/ftplugin/html.vim index c96867a..3c5ab84 100644 --- a/.config/nvim/after/ftplugin/html.vim +++ b/.config/nvim/after/ftplugin/html.vim @@ -1,2 +1,2 @@ -let b:ale_fixers = ['prettier_standard'] -let b:ale_linters = ['prettier_standard'] +let b:ale_linters = ['tidy'] +let b:ale_fixers = ['prettier'] diff --git a/.config/nvim/after/ftplugin/json.vim b/.config/nvim/after/ftplugin/json.vim index 77325c5..6498b1a 100644 --- a/.config/nvim/after/ftplugin/json.vim +++ b/.config/nvim/after/ftplugin/json.vim @@ -1,2 +1,2 @@ -let b:ale_linters = ['prettier_standard'] -let b:ale_fixers = ['prettier_standard'] +let b:ale_linters = ['prettier'] +let b:ale_fixers = ['prettier'] diff --git a/.config/nvim/after/ftplugin/markdown.vim b/.config/nvim/after/ftplugin/markdown.vim index 5ee4e5c..975de5b 100644 --- a/.config/nvim/after/ftplugin/markdown.vim +++ b/.config/nvim/after/ftplugin/markdown.vim @@ -2,7 +2,7 @@ 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 synmaxcol=0 -setlocal spell spelllang=es,en_us,cjk +setlocal spell spelllang=es_AR,en_us,cjk setlocal formatoptions& setlocal formatoptions+=tqn setlocal formatlistpat=^\\s*\\(\\d\\+\\\|[a-z]\\)[\\].)]\\s* @@ -26,5 +26,5 @@ inoremap :.s/\[\]/\[x\] nnoremap ]] :call dead#functions#JumpToNextHeading("down", v:count1) nnoremap [[ :call dead#functions#JumpToNextHeading("up", v:count1) - -let b:ale_fixers = ['prettier_standard'] +let b:ale_linters = ['prettier'] +let b:ale_fixers = ['prettier'] diff --git a/.config/nvim/after/ftplugin/qf.vim b/.config/nvim/after/ftplugin/qf.vim new file mode 100644 index 0000000..f652c82 --- /dev/null +++ b/.config/nvim/after/ftplugin/qf.vim @@ -0,0 +1,45 @@ +setlocal cursorline +setlocal nospell +setlocal nolist + +" Close with q +nnoremap q :close + +nnoremap :call older() +nnoremap :call newer() + +function! s:is_quickfix() abort + return getwininfo(win_getid())[0].quickfix +endfunction + +if !exists('*s:older') + function! s:older() abort + try + if s:is_quickfix() + colder + else + lolder + endif + catch + echohl ErrorMsg + echo substitute(v:exception, 'Vim(.*):', '', '') + echohl None + endtry + endfunction +endif + +if !exists('*s:newer') + function! s:newer() abort + try + if s:is_quickfix() + cnewer + else + lnewer + endif + catch + echohl ErrorMsg + echo substitute(v:exception, 'Vim(.*):', '', '') + echohl None + endtry + endfunction +endif diff --git a/.config/nvim/after/ftplugin/sh.vim b/.config/nvim/after/ftplugin/sh.vim index ac07721..a5cd012 100644 --- a/.config/nvim/after/ftplugin/sh.vim +++ b/.config/nvim/after/ftplugin/sh.vim @@ -1,5 +1,3 @@ -setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab - if !exists("b:sh_indent_options") let b:sh_indent_options = {} endif diff --git a/.config/nvim/after/ftplugin/terminal.vim b/.config/nvim/after/ftplugin/terminal.vim new file mode 100644 index 0000000..a615c0e --- /dev/null +++ b/.config/nvim/after/ftplugin/terminal.vim @@ -0,0 +1,6 @@ +setlocal nofoldenable foldcolumn=0 +setlocal nonumber norelativenumber +setlocal signcolumn=no +setlocal wrap noruler + +startinsert! diff --git a/.config/nvim/after/ftplugin/tex.vim b/.config/nvim/after/ftplugin/tex.vim index c38c638..4a21a4d 100644 --- a/.config/nvim/after/ftplugin/tex.vim +++ b/.config/nvim/after/ftplugin/tex.vim @@ -1,2 +1,2 @@ -setlocal spell spelllang=es,en_us +setlocal spell spelllang=es_AR,en_us inoremap u[s1z=`]au diff --git a/.config/nvim/after/ftplugin/vim.vim b/.config/nvim/after/ftplugin/vim.vim new file mode 100644 index 0000000..cad5b94 --- /dev/null +++ b/.config/nvim/after/ftplugin/vim.vim @@ -0,0 +1 @@ +let b:ale_linters = ['vint'] diff --git a/.config/nvim/after/ftplugin/yaml.vim b/.config/nvim/after/ftplugin/yaml.vim new file mode 100644 index 0000000..1b82e71 --- /dev/null +++ b/.config/nvim/after/ftplugin/yaml.vim @@ -0,0 +1 @@ +let b:ale_linters = ['prettier'] diff --git a/.config/nvim/after/ftplugin/zsh.vim b/.config/nvim/after/ftplugin/zsh.vim new file mode 100644 index 0000000..ed6f38f --- /dev/null +++ b/.config/nvim/after/ftplugin/zsh.vim @@ -0,0 +1,2 @@ +setlocal shiftwidth=2 + diff --git a/.config/nvim/after/plugin/coc.vim b/.config/nvim/after/plugin/coc.vim index 54658d3..1fc558a 100644 --- a/.config/nvim/after/plugin/coc.vim +++ b/.config/nvim/after/plugin/coc.vim @@ -1,9 +1,8 @@ -" Config -nnoremap :vsplit:CocConfig - if exists('b:coc_enabled=1') set completeopt-=preview + nnoremap :vsplit:CocConfig + let g:coc_global_extensions = ['coc-highlight', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json', 'coc-emmet'] inoremap @@ -49,4 +48,12 @@ if exists('b:coc_enabled=1') 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/after/plugin/fugitive.vim b/.config/nvim/after/plugin/fugitive.vim new file mode 100644 index 0000000..81a73e3 --- /dev/null +++ b/.config/nvim/after/plugin/fugitive.vim @@ -0,0 +1,4 @@ +augroup Profugo + autocmd! + autocmd BufReadPost fugitive:///*//2/*,fugitive:///*//3/* setlocal nomodifiable readonly +augroup END diff --git a/.config/nvim/autoload/dead/functions.vim b/.config/nvim/autoload/dead/functions.vim index 7e41971..9419a06 100644 --- a/.config/nvim/autoload/dead/functions.vim +++ b/.config/nvim/autoload/dead/functions.vim @@ -20,3 +20,11 @@ function! dead#functions#JumpToNextHeading(direction, count) silent execute "normal! " . col . "|" unlet col endfunction + +function! dead#functions#NewMail() + let l:path = system('mktemp --tmpdir XXXXXXXXXX.eml') + execute 'sp' l:path + " See the help for `skeleton`. + 0r ~/.config/nvim/templates/correo.skeleton | w | $ +endfunction +command! Mail call dead#functions#NewMail() diff --git a/.config/nvim/colors/srcery.vim b/.config/nvim/colors/srcery.vim new file mode 100644 index 0000000..ee799ff --- /dev/null +++ b/.config/nvim/colors/srcery.vim @@ -0,0 +1,1075 @@ +" 'srcery.vim' -- Vim color scheme. +" Maintainer: Roosta (mail@roosta.sh) +" Description: Colorscheme that focus ease of use and clearly defined contrasting colors with a slightly earthy tone. +" Original Source: https://github.com/morhetz/gruvbox + +scriptencoding utf-8 + +set background=dark + +if v:version > 580 + hi clear + if exists('syntax_on') + syntax reset + endif +endif + +let g:colors_name='srcery' + +if !has('gui_running') && &t_Co != 256 + finish +endif + +" Palette {{{ + +let s:black = ['#1C1B19', 0] +let s:red = ['#EF2F27', 1] +let s:green = ['#519F50', 2] +let s:yellow = ['#FBB829', 3] +let s:blue = ['#2C78BF', 4] +let s:magenta = ['#E02C6D', 5] +let s:cyan = ['#0AAEB3', 6] +let s:white = ['#D0BFA1', 7] +let s:bright_black = ['#918175', 8] +let s:bright_red = ['#F75341', 9] +let s:bright_green = ['#98BC37', 10] +let s:bright_yellow = ['#FED06E', 11] +let s:bright_blue = ['#68A8E4', 12] +let s:bright_magenta = ['#FF5C8F', 13] +let s:bright_cyan = ['#53FDE9', 14] +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:xgray1 = ['#262626', 235] +let s:xgray2 = ['#303030', 236] +let s:xgray3 = ['#3A3A3A', 237] +let s:xgray4 = ['#444444', 238] +let s:xgray5 = ['#4E4E4E', 239] +let s:xgray6 = ['#585858', 240] + +"}}} +" Setup Variables: {{{ + +let s:none = ['NONE', 'NONE'] + +if !exists('g:srcery_bold') + let g:srcery_bold=1 +endif + +if !exists('g:srcery_italic') + if has('gui_running') || $TERM_ITALICS ==? 'true' + let g:srcery_italic=1 + else + let g:srcery_italic=0 + endif +endif + +if !exists('g:srcery_transparent_background') + let g:srcery_transparent_background=0 +endif + +if !exists('g:srcery_undercurl') + let g:srcery_undercurl=1 +endif + +if !exists('g:srcery_underline') + let g:srcery_underline=1 +endif + +if !exists('g:srcery_inverse') + let g:srcery_inverse=1 +endif + +if !exists('g:srcery_inverse_matches') + let g:srcery_inverse_matches=0 +endif + +if !exists('g:srcery_inverse_match_paren') + let g:srcery_inverse_match_paren=0 +endif + +if !exists('g:srcery_dim_lisp_paren') + let g:srcery_dim_lisp_paren=0 +endif + +" }}} +" Setup Emphasis: {{{ + +let s:bold = 'bold,' +if g:srcery_bold == 0 + let s:bold = '' +endif + +let s:italic = 'italic,' +if g:srcery_italic == 0 + let s:italic = '' +endif + +let s:underline = 'underline,' +if g:srcery_underline == 0 + let s:underline = '' +endif + +let s:undercurl = 'undercurl,' +if g:srcery_undercurl == 0 + let s:undercurl = '' +endif + +let s:inverse = 'inverse,' +if g:srcery_inverse == 0 + let s:inverse = '' +endif + +" }}} +" Highlighting Function: {{{ + +function! s:HL(group, fg, ...) + " Arguments: group, guifg, guibg, gui, guisp + + " foreground + let l:fg = a:fg + + " background + if a:0 >= 1 + let l:bg = a:1 + else + let l:bg = s:none + endif + + " emphasis + if a:0 >= 2 && strlen(a:2) + let l:emstr = a:2 + else + let l:emstr = 'NONE,' + endif + + let l:histring = [ 'hi', a:group, + \ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1], + \ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1], + \ 'gui=' . l:emstr[:-2], 'cterm=' . l:emstr[:-2] + \ ] + + " special + if a:0 >= 3 + call add(l:histring, 'guisp=' . a:3[0]) + endif + + execute join(l:histring, ' ') +endfunction +"}}} +" Srcery Hi Groups: {{{ + +" memoize common hi groups +call s:HL('SrceryWhite', s:white) +call s:HL('SrceryRed', s:red) +call s:HL('SrceryGreen', s:green) +call s:HL('SrceryYellow', s:yellow) +call s:HL('SrceryBlue', s:blue) +call s:HL('SrceryMagenta', s:magenta) +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('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('SrceryBrightRed', s:bright_red, s:none) +call s:HL('SrceryBrightGreen', s:bright_green, s:none) +call s:HL('SrceryBrightYellow', s:bright_yellow, s:none) +call s:HL('SrceryBrightBlue', s:bright_blue, s:none) +call s:HL('SrceryBrightMagenta', s:bright_magenta, s:none) +call s:HL('SrceryBrightCyan', s:bright_cyan, s:none) +call s:HL('SrceryBrightBlack', s:bright_black, s:none) +call s:HL('SrceryBrightWhite', s:bright_white) + +" special +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('SrceryHardBlack', s:hard_black) +call s:HL('SrceryXgray1', s:xgray1) +call s:HL('SrceryXgray2', s:xgray2) +call s:HL('SrceryXgray3', s:xgray3) +call s:HL('SrceryXgray4', s:xgray4) +call s:HL('SrceryXgray5', s:xgray5) +call s:HL('SrceryXgray6', s:xgray6) + +" }}} +" Setup Terminal Colors For Neovim: {{{ + +if has('nvim') + let g:terminal_color_0 = s:black[0] + let g:terminal_color_8 = s:bright_black[0] + + let g:terminal_color_1 = s:red[0] + let g:terminal_color_9 = s:bright_red[0] + + let g:terminal_color_2 = s:green[0] + let g:terminal_color_10 = s:bright_green[0] + + let g:terminal_color_3 = s:yellow[0] + let g:terminal_color_11 = s:bright_yellow[0] + + let g:terminal_color_4 = s:blue[0] + let g:terminal_color_12 = s:bright_blue[0] + + let g:terminal_color_5 = s:magenta[0] + let g:terminal_color_13 = s:bright_magenta[0] + + let g:terminal_color_6 = s:cyan[0] + let g:terminal_color_14 = s:bright_cyan[0] + + let g:terminal_color_7 = s:white[0] + let g:terminal_color_15 = s:bright_white[0] +endif + +" }}} +" Setup Terminal Colors For Vim with termguicolors: {{{ + +if exists('*term_setansicolors') + let g:terminal_ansi_colors = repeat([0], 16) + + let g:terminal_ansi_colors[0] = s:black[0] + let g:terminal_ansi_colors[8] = s:bright_black[0] + + let g:terminal_ansi_colors[1] = s:red[0] + let g:terminal_ansi_colors[9] = s:bright_red[0] + + let g:terminal_ansi_colors[2] = s:green[0] + let g:terminal_ansi_colors[10] = s:bright_green[0] + + let g:terminal_ansi_colors[3] = s:yellow[0] + let g:terminal_ansi_colors[11] = s:bright_yellow[0] + + let g:terminal_ansi_colors[4] = s:blue[0] + let g:terminal_ansi_colors[12] = s:bright_blue[0] + + let g:terminal_ansi_colors[5] = s:magenta[0] + let g:terminal_ansi_colors[13] = s:bright_magenta[0] + + let g:terminal_ansi_colors[6] = s:cyan[0] + let g:terminal_ansi_colors[14] = s:bright_cyan[0] + + let g:terminal_ansi_colors[7] = s:white[0] + let g:terminal_ansi_colors[15] = s:bright_white[0] +endif + +" }}} + +" Vanilla colorscheme --------------------------------------------------------- +" General UI: {{{ + +" Normal text +" +if g:srcery_transparent_background == 1 && !has('gui_running') + call s:HL('Normal', s:bright_white, s:none) + else + call s:HL('Normal', s:bright_white, s:black) +endif + +if v:version >= 700 + " Screen line that the cursor is + call s:HL('CursorLine', s:none, s:xgray2) + " Screen column that the cursor is + hi! link CursorColumn CursorLine + + + if g:srcery_transparent_background == 1 && !has('gui_running') + " Tab pages line filler + call s:HL('TabLineFill', s:green, s:none) + " Active tab page label + call s:HL('TabLineSel', s:red, s:none, s:bold) + else + call s:HL('TabLineFill', s:green, s:black) + call s:HL('TabLineSel', s:red, s:black, s:bold) + endif + + " Not active tab page label + hi! link TabLine TabLineFill + + " Match paired bracket under the cursor + " + if g:srcery_inverse_match_paren == 1 + call s:HL('MatchParen', s:bright_magenta, s:none, s:inverse . s:bold) + else + call s:HL('MatchParen', s:bright_magenta, s:none, s:bold) + endif +endif + +if v:version >= 703 + " Highlighted screen columns + call s:HL('ColorColumn', s:none, s:xgray2) + + " Concealed element: \lambda → λ + call s:HL('Conceal', s:blue, s:none) + + " Line number of CursorLine + if g:srcery_transparent_background == 1 && !has('gui_running') + call s:HL('CursorLineNr', s:yellow, s:none) + else + call s:HL('CursorLineNr', s:yellow, s:black) + endif + +endif + +hi! link NonText SrceryXgray4 +hi! link SpecialKey SrceryXgray4 + +if g:srcery_inverse == 1 + call s:HL('Visual', s:none, s:none, s:inverse) +else + call s:HL('Visual', s:none, s:xgray2, s:bold) +endif + +hi! link VisualNOS Visual + +if g:srcery_inverse == 1 && g:srcery_inverse_matches == 1 + call s:HL('Search', s:none, s:none, s:inverse) + call s:HL('IncSearch', s:none, s:none, s:inverse) +else + call s:HL('Search', s:none, s:xgray5, s:bold) + call s:HL('IncSearch', s:none, s:xgray5, s:underline . s:bold) +endif + +call s:HL('Underlined', s:blue, s:none, s:underline) + +call s:HL('StatusLine', s:bright_white, s:xgray2) + +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) + + " Current match in wildmenu completion + call s:HL('WildMenu', s:blue, s:none, s:bold) +else + call s:HL('StatusLineNC', s:bright_black, s:black, s:underline) + call s:HL('VertSplit', s:bright_white, s:black) + call s:HL('WildMenu', s:blue, s:black, s:bold) +endif + +" Directory names, special names in listing +hi! link Directory SrceryGreenBold + +" Titles for output from :set all, :autocmd, etc. +hi! link Title SrceryGreenBold + +" Error messages on the command line +call s:HL('ErrorMsg', s:bright_white, s:red) +" More prompt: -- More -- +hi! link MoreMsg SrceryYellowBold +" Current mode message: -- INSERT -- +hi! link ModeMsg SrceryYellowBold +" 'Press enter' prompt and yes/no questions +hi! link Question SrceryOrangeBold +" Warning messages +hi! link WarningMsg SrceryRedBold + +" }}} +" Gutter: {{{ + +" Line number for :number and :# commands +call s:HL('LineNr', s:bright_black) + +if g:srcery_transparent_background == 1 && !has('gui_running') + " Column where signs are displayed + " TODO Possibly need to fix SignColumn + call s:HL('SignColumn', s:none, s:none) + " Line used for closed folds + call s:HL('Folded', s:bright_black, s:none, s:italic) + " Column where folds are displayed + call s:HL('FoldColumn', s:bright_black, s:none) +else + call s:HL('SignColumn', s:none, s:black) + call s:HL('Folded', s:bright_black, s:black, s:italic) + call s:HL('FoldColumn', s:bright_black, s:black) +endif + +" }}} +" Cursor: {{{ + +" Character under cursor +call s:HL('Cursor', s:black, s:yellow) +" Visual mode cursor, selection +hi! link vCursor Cursor +" Input moder cursor +hi! link iCursor Cursor +" Language mapping cursor +hi! link lCursor Cursor + +" }}} +" Syntax Highlighting: {{{ + +hi! link Special SrceryOrange + +call s:HL('Comment', s:bright_black, s:none, s:italic) + +if g:srcery_transparent_background == 1 && !has('gui_running') + call s:HL('Todo', s:bright_white, s:none, s:bold . s:italic) +else + call s:HL('Todo', s:bright_white, s:black, s:bold . s:italic) +endif + +call s:HL('Error', s:bright_white, s:red, s:bold) + +" String constant: "this is a string" +call s:HL('String', s:bright_green) + +" Generic statement +hi! link Statement SrceryRed +" if, then, else, endif, swicth, etc. +hi! link Conditional SrceryRed +" for, do, while, etc. +hi! link Repeat SrceryRed +" case, default, etc. +hi! link Label SrceryRed +" try, catch, throw +hi! link Exception SrceryRed +" sizeof, "+", "*", etc. +hi! link Operator Normal +" Any other keyword +hi! link Keyword SrceryRed + +" Variable name +hi! link Identifier SrceryCyan +" Function name +hi! link Function SrceryYellow + +" Generic preprocessor +hi! link PreProc SrceryCyan +" Preprocessor #include +hi! link Include SrceryCyan +" Preprocessor #define +hi! link Define SrceryCyan +" Same as Define +hi! link Macro SrceryOrange +" Preprocessor #if, #else, #endif, etc. +hi! link PreCondit SrceryCyan + +" Generic constant +hi! link Constant SrceryBrightMagenta +" Character constant: 'c', '/n' +hi! link Character SrceryBrightMagenta +" Boolean constant: TRUE, false +hi! link Boolean SrceryBrightMagenta +" Number constant: 234, 0xff +hi! link Number SrceryBrightMagenta +" Floating point constant: 2.3e10 +hi! link Float SrceryBrightMagenta + +" Generic type +hi! link Type SrceryBrightBlue +" static, register, volatile, etc +hi! link StorageClass SrceryOrange +" struct, union, enum, etc. +hi! link Structure SrceryCyan +" typedef +hi! link Typedef SrceryMagenta + +if g:srcery_dim_lisp_paren == 1 + hi! link Delimiter SrceryXgray6 +else + hi! link Delimiter SrceryBrightBlack +endif + +" }}} +" Completion Menu: {{{ + +if v:version >= 700 + " Popup menu: normal item + call s:HL('Pmenu', s:bright_white, s:xgray2) + " Popup menu: selected item + call s:HL('PmenuSel', s:bright_white, s:magenta, s:bold) + + if g:srcery_transparent_background == 1 && !has('gui_running') + " Popup menu: scrollbar + call s:HL('PmenuSbar', s:none, s:none) + " Popup menu: scrollbar thumb + call s:HL('PmenuThumb', s:none, s:none) + else + call s:HL('PmenuSbar', s:none, s:black) + call s:HL('PmenuThumb', s:none, s:black) + endif +endif + +" }}} +" Diffs: {{{ + +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('DiffChange', s:cyan, s:none) + call s:HL('DiffText', s:yellow, s:none) +else + call s:HL('DiffDelete', s:red, s:black) + call s:HL('DiffAdd', s:green, s:black) + call s:HL('DiffChange', s:cyan, s:black) + call s:HL('DiffText', s:yellow, s:black) +endif + +" }}} +" Spelling: {{{ + +if has('spell') + " Not capitalised word, or compile warnings + call s:HL('SpellCap', s:green, s:none, s:bold . s:italic) + " Not recognized word + call s:HL('SpellBad', s:none, s:none, s:undercurl, s:blue) + " Wrong spelling for selected region + call s:HL('SpellLocal', s:none, s:none, s:undercurl, s:cyan) + " Rare word + call s:HL('SpellRare', s:none, s:none, s:undercurl, s:magenta) +endif + +" }}} +" Terminal: {{{ + +if has('terminal') + " Must set an explicit background as NONE won't work + " Therefore not useful with transparent background option + call s:HL('Terminal', s:bright_white, s:hard_black) +endif + +" }}} + +" Plugin specific ------------------------------------------------------------- +" Sneak: {{{ + +hi! link Sneak Search +call s:HL('SneakScope', s:none, s:hard_black) +hi! link SneakLabel Search + +" }}} +" Rainbow Parentheses: {{{ + +if !exists('g:rbpt_colorpairs') + let g:rbpt_colorpairs = + \ [ + \ ['blue', '#2C78BF'], ['202', '#FF5F00'], + \ ['red', '#EF2F27'], ['magenta', '#E02C6D'] + \ ] +endif + +let g:rainbow_guifgs = [ '#E02C6D', '#EF2F27', '#D75F00', '#2C78BF'] +let g:rainbow_ctermfgs = [ 'magenta', 'red', '202', 'blue' ] + +if !exists('g:rainbow_conf') + let g:rainbow_conf = {} +endif +if !has_key(g:rainbow_conf, 'guifgs') + let g:rainbow_conf['guifgs'] = g:rainbow_guifgs +endif +if !has_key(g:rainbow_conf, 'ctermfgs') + let g:rainbow_conf['ctermfgs'] = g:rainbow_ctermfgs +endif + +let g:niji_dark_colours = g:rbpt_colorpairs +let g:niji_light_colours = g:rbpt_colorpairs + +"}}} +" GitGutter: {{{ + +hi! link GitGutterAdd SrceryGreen +hi! link GitGutterChange SrceryYellow +hi! link GitGutterDelete SrceryRed +hi! link GitGutterChangeDelete SrceryYellow + +" }}} +" GitCommit: "{{{ + +hi! link gitcommitSelectedFile SrceryGreen +hi! link gitcommitDiscardedFile SrceryRed + +" }}} +" Asynchronous Lint Engine: {{{ + +call s:HL('ALEError', s:none, s:none, s:undercurl, s:red) +call s:HL('ALEWarning', s:none, s:none, s:undercurl, s:yellow) +call s:HL('ALEInfo', s:none, s:none, s:undercurl, s:blue) + +hi! link ALEErrorSign SrceryRed +hi! link ALEWarningSign SrceryYellow +hi! link ALEInfoSign SrceryBlue + +" }}} +" vim-indent-guides: {{{ + +call s:HL('IndentGuidesEven', s:none, s:xgray3) +call s:HL('IndentGuidesOdd', s:none, s:xgray4) + +" }}} +" vim-startify {{{ + +hi! link StartifyNumber Statement +hi! link StartifyFile Normal +hi! link StartifyPath String +hi! link StartifySlash Normal +hi! link StartifyBracket Comment +hi! link StartifyHeader Type +hi! link StartifyFooter Normal +hi! link StartifySpecial Comment +hi! link StartifySection Identifier + +" }}} +" fzf: {{{ + +call s:HL('fzf1', s:magenta, s:xgray2) +call s:HL('fzf2', s:bright_green, s:xgray2) +call s:HL('fzf3', s:bright_white, s:xgray2) + +"}}} +" Netrw: {{{ + +hi! link netrwDir SrceryCyan +hi! link netrwClassify SrceryCyan +hi! link netrwLink SrceryBrightBlack +hi! link netrwSymLink SrceryWhite +hi! link netrwExe SrceryYellow +hi! link netrwComment SrceryBrightBlack +hi! link netrwList SrceryBlue +hi! link netrwTreeBar SrceryBrightBlack +hi! link netrwHelpCmd SrceryCyan +hi! link netrwVersion SrceryGreen +hi! link netrwCmdSep SrceryBrightBlack + +"}}} +" coc.nvim: {{{ + +hi! link CocErrorSign SrceryRed +hi! link CocWarningSign SrceryBrightOrange +hi! link CocInfoSign SrceryYellow +hi! link CocHintSign SrceryBlue +hi! link CocErrorFloat SrceryRed +hi! link CocWarningFloat SrceryOrange +hi! link CocInfoFloat SrceryYellow +hi! link CocHintFloat SrceryBlue +hi! link CocDiagnosticsError SrceryRed +hi! link CocDiagnosticsWarning SrceryOrange +hi! link CocDiagnosticsInfo SrceryYellow +hi! link CocDiagnosticsHint SrceryBlue + +hi! link CocSelectedText SrceryRed +hi! link CocCodeLens SrceryWhite + +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) + +" }}} +" CtrlP: "{{{ +hi! link CtrlPMatch SrceryMagenta +hi! link CtrlPLinePre SrceryBrightGreen +call s:HL('CtrlPMode1', s:bright_white, s:xgray3) +call s:HL('CtrlPMode2', s:bright_white, s:xgray5) +call s:HL('CtrlPStats', s:yellow, s:xgray2) +" }}} + +" Filetype specific ----------------------------------------------------------- +" Diff: {{{ + +hi! link diffAdded SrceryGreen +hi! link diffRemoved SrceryRed +hi! link diffChanged SrceryCyan + +hi! link diffFile SrceryOrange +hi! link diffNewFile SrceryYellow + +hi! link diffLine SrceryBlue + +" }}} +" Html: {{{ + +hi! link htmlTag SrceryBlue +hi! link htmlEndTag SrceryBlue + +hi! link htmlTagName SrceryBlue +hi! link htmlTag SrceryBrightBlack +hi! link htmlArg SrceryYellow + +hi! link htmlScriptTag SrceryRed +hi! link htmlTagN SrceryBlue +hi! link htmlSpecialTagName SrceryBlue + +call s:HL('htmlLink', s:bright_white, s:none, s:underline) + +hi! link htmlSpecialChar SrceryYellow + +if g:srcery_transparent_background == 1 && !has('gui_running') + call s:HL('htmlBold', s:bright_white, s:none, s:bold) + call s:HL('htmlBoldUnderline', s:bright_white, s:none, s:bold . s:underline) + call s:HL('htmlBoldItalic', s:bright_white, s:none, s:bold . s:italic) + call s:HL('htmlBoldUnderlineItalic', s:bright_white, s:none, s:bold . s:underline . s:italic) + call s:HL('htmlUnderline', s:bright_white, s:none, s:underline) + call s:HL('htmlUnderlineItalic', s:bright_white, s:none, s:underline . s:italic) + call s:HL('htmlItalic', s:bright_white, s:none, s:italic) +else + call s:HL('htmlBold', s:bright_white, s:black, s:bold) + call s:HL('htmlBoldUnderline', s:bright_white, s:black, s:bold . s:underline) + call s:HL('htmlBoldItalic', s:bright_white, s:black, s:bold . s:italic) + call s:HL('htmlBoldUnderlineItalic', s:bright_white, s:black, s:bold . s:underline . s:italic) + call s:HL('htmlUnderline', s:bright_white, s:black, s:underline) + call s:HL('htmlUnderlineItalic', s:bright_white, s:black, s:underline . s:italic) + call s:HL('htmlItalic', s:bright_white, s:black, s:italic) +endif + + +" }}} +" Xml: {{{ + +hi! link xmlTag SrceryBlue +hi! link xmlEndTag SrceryBlue +hi! link xmlTagName SrceryBlue +hi! link xmlEqual SrceryBlue +hi! link docbkKeyword SrceryCyanBold + +hi! link xmlDocTypeDecl SrceryBrightBlack +hi! link xmlDocTypeKeyword SrceryMagenta +hi! link xmlCdataStart SrceryBrightBlack +hi! link xmlCdataCdata SrceryMagenta +hi! link dtdFunction SrceryBrightBlack +hi! link dtdTagName SrceryMagenta + +hi! link xmlAttrib SrceryCyan +hi! link xmlProcessingDelim SrceryBrightBlack +hi! link dtdParamEntityPunct SrceryBrightBlack +hi! link dtdParamEntityDPunct SrceryBrightBlack +hi! link xmlAttribPunct SrceryBrightBlack + +hi! link xmlEntity SrceryYellow +hi! link xmlEntityPunct SrceryYellow +" }}} +" Vim: {{{ + +call s:HL('vimCommentTitle', s:bright_white, s:none, s:bold . s:italic) + +hi! link vimNotation SrceryYellow +hi! link vimBracket SrceryYellow +hi! link vimMapModKey SrceryYellow +hi! link vimFuncSID SrceryBrightWhite +hi! link vimSetSep SrceryBrightWhite +hi! link vimSep SrceryBrightWhite +hi! link vimContinue SrceryBrightWhite + +" }}} +" Lisp dialects: {{{ +if g:srcery_dim_lisp_paren == 1 + hi! link schemeParentheses SrceryXgray6 + hi! link clojureParen SrceryXgray6 +else + hi! link schemeParentheses SrceryBrightBlack + hi! link clojureParen SrceryBrightBlack +endif + +hi! link clojureKeyword SrceryBlue +hi! link clojureCond SrceryRed +hi! link clojureSpecial SrceryRed +hi! link clojureDefine SrceryRed + +hi! link clojureFunc SrceryYellow +hi! link clojureRepeat SrceryYellow +hi! link clojureCharacter SrceryCyan +hi! link clojureStringEscape SrceryCyan +hi! link clojureException SrceryRed + +hi! link clojureRegexp SrceryCyan +hi! link clojureRegexpEscape SrceryCyan +call s:HL('clojureRegexpCharClass', s:bright_white, s:none, s:bold) +hi! link clojureRegexpMod clojureRegexpCharClass +hi! link clojureRegexpQuantifier clojureRegexpCharClass + +hi! link clojureAnonArg SrceryYellow +hi! link clojureVariable SrceryBlue +hi! link clojureMacro SrceryOrangeBold + +hi! link clojureMeta SrceryYellow +hi! link clojureDeref SrceryYellow +hi! link clojureQuote SrceryYellow +hi! link clojureUnquote SrceryYellow +" }}} +" C: {{{ + +hi! link cOperator SrceryMagenta +hi! link cStructure SrceryYellow + +" }}} +" Python: {{{ + +hi! link pythonBuiltin SrceryYellow +hi! link pythonBuiltinObj SrceryYellow +hi! link pythonBuiltinFunc SrceryYellow +hi! link pythonFunction SrceryCyan +hi! link pythonDecorator SrceryRed +hi! link pythonInclude SrceryBlue +hi! link pythonImport SrceryBlue +hi! link pythonRun SrceryBlue +hi! link pythonCoding SrceryBlue +hi! link pythonOperator SrceryRed +hi! link pythonExceptions SrceryMagenta +hi! link pythonBoolean SrceryMagenta +hi! link pythonDot SrceryBrightWhite + +" }}} +" CSS/SASS: {{{ + +hi! link cssBraces SrceryBrightWhite +hi! link cssFunctionName SrceryYellow +hi! link cssIdentifier SrceryBlue +hi! link cssClassName SrceryBlue +hi! link cssClassNameDot SrceryBlue +hi! link cssColor SrceryBrightMagenta +hi! link cssSelectorOp SrceryBlue +hi! link cssSelectorOp2 SrceryBlue +hi! link cssImportant SrceryGreen +hi! link cssVendor SrceryBlue +hi! link cssMediaProp SrceryYellow +hi! link cssBorderProp SrceryYellow +hi! link cssAttrComma SrceryBrightWhite + +hi! link cssTextProp SrceryYellow +hi! link cssAnimationProp SrceryYellow +hi! link cssUIProp SrceryYellow +hi! link cssTransformProp SrceryYellow +hi! link cssTransitionProp SrceryYellow +hi! link cssPrintProp SrceryYellow +hi! link cssPositioningProp SrceryYellow +hi! link cssBoxProp SrceryYellow +hi! link cssFontDescriptorProp SrceryYellow +hi! link cssFlexibleBoxProp SrceryYellow +hi! link cssBorderOutlineProp SrceryYellow +hi! link cssBackgroundProp SrceryYellow +hi! link cssMarginProp SrceryYellow +hi! link cssListProp SrceryYellow +hi! link cssTableProp SrceryYellow +hi! link cssFontProp SrceryYellow +hi! link cssPaddingProp SrceryYellow +hi! link cssDimensionProp SrceryYellow +hi! link cssRenderProp SrceryYellow +hi! link cssColorProp SrceryYellow +hi! link cssGeneratedContentProp SrceryYellow +hi! link cssTagName SrceryBrightBlue + +" SASS +hi! link sassClass SrceryBlue +hi! link sassClassChar SrceryBlue +hi! link sassVariable SrceryCyan +hi! link sassIdChar SrceryBrightBlue + +" }}} +" JavaScript: {{{ + +hi! link javaScriptMember SrceryBlue +hi! link javaScriptNull SrceryMagenta + +" }}} +" YAJS: {{{ + +hi! link javascriptParens SrceryBrightCyan +hi! link javascriptFuncArg Normal +hi! link javascriptDocComment SrceryGreen +hi! link javascriptArrayMethod Function +hi! link javascriptReflectMethod Function +hi! link javascriptStringMethod Function +hi! link javascriptObjectMethod Function +hi! link javascriptObjectStaticMethod Function +hi! link javascriptObjectLabel SrceryBlue + +hi! link javascriptProp SrceryBlue + +hi! link javascriptVariable SrceryBrightBlue +hi! link javascriptOperator SrceryBrightCyan +hi! link javascriptFuncKeyword SrceryBrightRed +hi! link javascriptFunctionMethod SrceryYellow +hi! link javascriptReturn SrceryBrightRed +hi! link javascriptEndColons Normal + +" }}} +" CoffeeScript: {{{ + +hi! link coffeeExtendedOp SrceryBrightWhite +hi! link coffeeSpecialOp SrceryBrightWhite +hi! link coffeeCurly SrceryYellow +hi! link coffeeParen SrceryBrightWhite +hi! link coffeeBracket SrceryYellow + +" }}} +" Ruby: {{{ + +hi! link rubyStringDelimiter SrceryGreen +hi! link rubyInterpolationDelimiter SrceryCyan +hi! link rubyDefine Keyword + +" }}} +" ObjectiveC: {{{ + +hi! link objcTypeModifier SrceryRed +hi! link objcDirective SrceryBlue + +" }}} +" Go: {{{ + +hi! link goDirective SrceryCyan +hi! link goConstants SrceryMagenta +hi! link goDeclaration SrceryRed +hi! link goDeclType SrceryBlue +hi! link goBuiltins SrceryYellow + +" }}} +" Lua: {{{ + +hi! link luaIn SrceryRed +hi! link luaFunction SrceryCyan +hi! link luaTable SrceryYellow + +" }}} +" MoonScript: {{{ + +hi! link moonSpecialOp SrceryBrightWhite +hi! link moonExtendedOp SrceryBrightWhite +hi! link moonFunction SrceryBrightWhite +hi! link moonObject SrceryYellow + +" }}} +" Java: {{{ + +hi! link javaAnnotation SrceryBlue +hi! link javaDocTags SrceryCyan +hi! link javaCommentTitle vimCommentTitle +hi! link javaParen SrceryBrightWhite +hi! link javaParen1 SrceryBrightWhite +hi! link javaParen2 SrceryBrightWhite +hi! link javaParen3 SrceryBrightWhite +hi! link javaParen4 SrceryBrightWhite +hi! link javaParen5 SrceryBrightWhite +hi! link javaOperator SrceryYellow + +hi! link javaVarArg SrceryGreen + +" }}} +" Elixir: {{{ + +hi! link elixirDocString Comment + +hi! link elixirStringDelimiter SrceryGreen +hi! link elixirInterpolationDelimiter SrceryCyan + +" }}} +" Scala: {{{ + +" NB: scala vim syntax file is kinda horrible +hi! link scalaNameDefinition SrceryBlue +hi! link scalaCaseFollowing SrceryBlue +hi! link scalaCapitalWord SrceryBlue +hi! link scalaTypeExtension SrceryBlue + +hi! link scalaKeyword SrceryRed +hi! link scalaKeywordModifier SrceryRed + +hi! link scalaSpecial SrceryCyan +hi! link scalaOperator SrceryBlue + +hi! link scalaTypeDeclaration SrceryYellow +hi! link scalaTypeTypePostDeclaration SrceryYellow + +hi! link scalaInstanceDeclaration SrceryBlue +hi! link scalaInterpolation SrceryCyan + +" }}} +" Markdown: {{{ + +call s:HL('markdownItalic', s:bright_white, s:none, s:italic) + +hi! link markdownH1 SrceryGreenBold +hi! link markdownH2 SrceryGreenBold +hi! link markdownH3 SrceryYellowBold +hi! link markdownH4 SrceryYellowBold +hi! link markdownH5 SrceryYellow +hi! link markdownH6 SrceryYellow + +hi! link markdownCode SrceryCyan +hi! link markdownCodeBlock SrceryCyan +hi! link markdownCodeDelimiter SrceryCyan + +hi! link markdownBlockquote SrceryBrightBlack +hi! link markdownListMarker SrceryBrightBlack +hi! link markdownOrderedListMarker SrceryBrightBlack +hi! link markdownRule SrceryBrightBlack +hi! link markdownHeadingRule SrceryBrightBlack + +hi! link markdownUrlDelimiter SrceryBrightWhite +hi! link markdownLinkDelimiter SrceryBrightWhite +hi! link markdownLinkTextDelimiter SrceryBrightWhite + +hi! link markdownHeadingDelimiter SrceryYellow +hi! link markdownUrl SrceryMagenta +hi! link markdownUrlTitleDelimiter SrceryGreen + +call s:HL('markdownLinkText', s:bright_black, s:none, s:underline) +hi! link markdownIdDeclaration markdownLinkText + +" }}} +" Haskell: {{{ + +" hi! link haskellType SrceryYellow +" hi! link haskellOperators SrceryYellow +" hi! link haskellConditional SrceryCyan +" hi! link haskellLet SrceryYellow +" +hi! link haskellType SrceryBlue +hi! link haskellIdentifier SrceryBlue +hi! link haskellSeparator SrceryBlue +hi! link haskellDelimiter SrceryBrightWhite +hi! link haskellOperators SrceryBlue +" +hi! link haskellBacktick SrceryYellow +hi! link haskellStatement SrceryYellow +hi! link haskellConditional SrceryYellow + +hi! link haskellLet SrceryCyan +hi! link haskellDefault SrceryCyan +hi! link haskellWhere SrceryCyan +hi! link haskellBottom SrceryCyan +hi! link haskellBlockKeywords SrceryCyan +hi! link haskellImportKeywords SrceryCyan +hi! link haskellDeclKeyword SrceryCyan +hi! link haskellDeriving SrceryCyan +hi! link haskellAssocType SrceryCyan + +hi! link haskellNumber SrceryMagenta +hi! link haskellPragma SrceryMagenta + +hi! link haskellString SrceryGreen +hi! link haskellChar SrceryGreen + +" }}} +" Json: {{{ + +hi! link jsonKeyword SrceryGreen +hi! link jsonQuote SrceryGreen +hi! link jsonBraces SrceryBlue +hi! link jsonString SrceryBlue + +" }}} +" Rust: {{{ +"https://github.com/rust-lang/rust.vim/blob/master/syntax/rust.vim +hi! link rustCommentLineDoc SrceryGreen +hi! link rustModPathSep SrceryBrightBlack +" }}} +" Make: {{{ +hi! link makePreCondit SrceryRed +hi! link makeCommands SrceryBrightWhite +hi! link makeTarget SrceryYellow +" }}} +" Misc: {{{ +call s:HL('shParenError', s:bright_white, s:bright_red) +call s:HL('ExtraWhitespace', s:none, s:red) +" }}} + +" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker : diff --git a/.config/nvim/ftdetect/json.vim b/.config/nvim/ftdetect/json.vim new file mode 100644 index 0000000..7433dee --- /dev/null +++ b/.config/nvim/ftdetect/json.vim @@ -0,0 +1 @@ +setlocal formatexpr=CocAction('formatSelected') diff --git a/.config/nvim/ftdetect/mail.vim b/.config/nvim/ftdetect/mail.vim new file mode 100644 index 0000000..6cbf23f --- /dev/null +++ b/.config/nvim/ftdetect/mail.vim @@ -0,0 +1 @@ +au BufNewFile,BufRead neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\} set filetype=mail diff --git a/.config/nvim/ftdetect/markdown.vim b/.config/nvim/ftdetect/markdown.vim new file mode 100644 index 0000000..f5c488f --- /dev/null +++ b/.config/nvim/ftdetect/markdown.vim @@ -0,0 +1 @@ +au! BufNewFile,BufFilePre,BufRead *.md set filetype=markdown.pandoc diff --git a/.config/nvim/ftdetect/typescript.vim b/.config/nvim/ftdetect/typescript.vim new file mode 100644 index 0000000..7433dee --- /dev/null +++ b/.config/nvim/ftdetect/typescript.vim @@ -0,0 +1 @@ +setlocal formatexpr=CocAction('formatSelected') diff --git a/.config/nvim/ftplugin/gitconfig.vim b/.config/nvim/ftplugin/gitconfig.vim index bbd8967..e7e03aa 100644 --- a/.config/nvim/ftplugin/gitconfig.vim +++ b/.config/nvim/ftplugin/gitconfig.vim @@ -1 +1,2 @@ setlocal noexpandtab +setlocal nolist diff --git a/.config/nvim/ftplugin/go.vim b/.config/nvim/ftplugin/go.vim deleted file mode 100644 index 72fc532..0000000 --- a/.config/nvim/ftplugin/go.vim +++ /dev/null @@ -1,9 +0,0 @@ -setlocal noexpandtab -setlocal shiftwidth=4 -setlocal tabstop=4 - -aug miscs - au! - au CursorHold * silent call CocActionAsync('highlight') - au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') -aug END diff --git a/.config/nvim/ftplugin/mail.vim b/.config/nvim/ftplugin/mail.vim new file mode 100644 index 0000000..3ca7063 --- /dev/null +++ b/.config/nvim/ftplugin/mail.vim @@ -0,0 +1,56 @@ +" 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 + +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 + +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/init.vim b/.config/nvim/init.vim index c91a16c..30762bb 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -15,7 +15,9 @@ if empty(glob('~/.local/share/nvim/site/autoload/plug.vim')) \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall --sync | call coc#util#install() | source $MYVIMRC endif + let $GIT_EDITOR = 'nvr -cc split --remote-wait' + let mapleader="\" let maplocalleader=',' @@ -32,12 +34,15 @@ let g:srcery_underline = 1 let g:srcery_undercurl = 1 colorscheme srcery -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', 'go']} -Plug 'tpope/vim-fugitive' -Plug 'airblade/vim-gitgutter' -Plug 'junegunn/fzf.vim' -Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' } -call plug#end() +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 '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 diff --git a/.config/nvim/plugin/autocmds.vim b/.config/nvim/plugin/autocmds.vim index ddd65e9..8bd87bb 100644 --- a/.config/nvim/plugin/autocmds.vim +++ b/.config/nvim/plugin/autocmds.vim @@ -15,6 +15,7 @@ if !exists('autocommands_loaded') && has('autocmd') au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete au BufNewFile,BufRead requirements*.txt set syntax=python au FileType fzf tnoremap + au BufRead,BufNewFile /tmp/neomutt* set filetype=mail aug END aug StatusLine diff --git a/.config/nvim/plugin/fm.vim b/.config/nvim/plugin/fm.vim new file mode 100644 index 0000000..3beadac --- /dev/null +++ b/.config/nvim/plugin/fm.vim @@ -0,0 +1,79 @@ +let g:netrw_dirhistmax=0 +let g:netrw_banner = 0 + +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 o defx#do_action('open_tree', 'toggle') + nnoremap l defx#do_action('open_tree') + nnoremap h defx#do_action('close_tree') + nnoremap defx#do_action('multi', ['drop', 'quit']) + nnoremap defx#do_action('multi', [['open', 'botright vsplit'], 'quit']) + nnoremap defx#do_action('multi', [['open', 'topleft split'], 'quit']) + nnoremap t defx#do_action('multi', [['drop', 'tabnew'], 'quit']) + nnoremap D defx#do_action('new_directory') + nnoremap F defx#do_action('new_multiple_files') + nnoremap dd defx#do_action('remove') + nnoremap r defx#do_action('rename') + nnoremap x defx#do_action('execute_system') + nnoremap . defx#do_action('toggle_ignored_files') + nnoremap y defx#do_action('yank_path') + nnoremap defx#do_action('cd', ['..']) + nnoremap ~ defx#async_action('cd') + nnoremap q defx#do_action('quit') + nnoremap ' defx#do_action('toggle_select') . 'j' + nnoremap * defx#do_action('toggle_select_all') + nnoremap defx#do_action('redraw') + nnoremap S defx#do_action('toggle_sort', 'Time') + nnoremap cd defx#do_action('change_vim_cwd') + + nnoremap / defx#do_action('cd', getcwd()) + nnoremap c defx#do_action('copy') + nnoremap m defx#do_action('move') + nnoremap p defx#do_action('paste') + + nnoremap j + \ line('.') == line('$') ? 'gg' : 'j' + nnoremap k + \ line('.') == 1 ? 'G' : 'k' +endfunction + +nnoremap :Defx -toggle diff --git a/.config/nvim/plugin/gitgutter.vim b/.config/nvim/plugin/gitgutter.vim index 5ed025d..f868b12 100644 --- a/.config/nvim/plugin/gitgutter.vim +++ b/.config/nvim/plugin/gitgutter.vim @@ -1,5 +1,8 @@ -let g:gitgutter_highlight_linenrs = 1 -let g:gitgutter_set_sign_backgrounds = 1 +let g:gitgutter_enabled = 0 +let g:gitgutter_realtime = 0 +let g:gitgutter_eager = 0 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' diff --git a/.config/nvim/plugin/mappings/normal.vim b/.config/nvim/plugin/mappings/normal.vim index 6961627..c212e65 100644 --- a/.config/nvim/plugin/mappings/normal.vim +++ b/.config/nvim/plugin/mappings/normal.vim @@ -1,10 +1,10 @@ " Ñ master race nnoremap ñ ; nnoremap Ñ , -nnoremap {q :cprev -nnoremap }q :cnext -nnoremap {Q :cfirst -nnoremap }Q :clast +nnoremap {q :cprev +nnoremap }q :cnext +nnoremap {Q :cfirst +nnoremap }Q :clast nnoremap {o :call append(line('.'), '') nnoremap }o :call append(line('.')-1, '') diff --git a/.config/nvim/plugin/mappings/terminal.vim b/.config/nvim/plugin/mappings/terminal.vim new file mode 100644 index 0000000..3d9a240 --- /dev/null +++ b/.config/nvim/plugin/mappings/terminal.vim @@ -0,0 +1,5 @@ +tnoremap +tnoremap h +tnoremap j +tnoremap k +tnoremap l diff --git a/.config/nvim/plugin/settings.vim b/.config/nvim/plugin/settings.vim index 835e016..7f9681a 100644 --- a/.config/nvim/plugin/settings.vim +++ b/.config/nvim/plugin/settings.vim @@ -43,6 +43,7 @@ set nowritebackup set undofile set undolevels=1000 set undoreload=10000 +set completeopt=menu,menuone,noinsert,noselect set listchars+=precedes:<,extends:> set diffopt+=algorithm:histogram,indent-heuristic set diffopt+=foldcolumn:0 diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 5a3e96b..868afc9 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -1,7 +1,4 @@ # BSPWM Hotkeys -ctrl + alt + r - bspc wm -r - super + {_,shift} + w bspc node -{c,k} @@ -46,22 +43,25 @@ super + {_,shift} + ntilde minve {hide,show} super + space - j4-dmenu-desktop --dmenu="dmenu -i -w 250 -p ' ' " --no-generic + rofi -show drun -theme dprompt -super + {b,q,s,n,p,t,r,d,i} - {$BROWSER,powermenu,vent,escribir,pom,tv,ref,leer,wpadd} +super + {b,q,s,n,p,t,r,d} + {$BROWSER,powermenu,rofi -show window,escribir,pom,tv,ref,leer} + +super + ctrl + d + deci super + {_,shift} + g {grabar,corte} -super + {z,x,v} - $TERMINAL {_,--class=flota,--class=flota -e pulsemixer} +super + {z,x,v,c} + $TERMINAL {_,--class=flota,--class=flota -e pulsemixer,--class=flota -e nvim +Mail +1bw +startinsert} super + {F1,F2,F3} {fecha,tapa,notifocus} -ctrl + alt + {x,l} - {xkill,xset s activate} +ctrl + alt + {x,l,r} + {xkill,xset s activate,bspc wm -r} Print pantallazo diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index a00dd3e..9199130 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -23,7 +23,7 @@ set -g base-index 1 # Panes set -g pane-base-index 1 set -g aggressive-resize on -set -wg main-pane-width 100 +set -wg main-pane-width 80 # Notificaciones set -g monitor-activity on @@ -39,11 +39,11 @@ set -g status-interval 60 set -g mode-style 'fg=#EEEEEE,bg=#75507B' set -g message-command-style bg=colour0,fg=colour13 set -g message-style 'bg=#222222,fg=white,italics' -set -g status-style "bg=default,fg=#999999" +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 window-status-separator ' ' -set -g window-status-current-style fg=colour3 +set -g window-status-current-style bg=default,fg=colour3 set -g window-status-activity-style bg=default,fg=colour15,italics set -g window-status-format '#{=-15:?window_name,#{window_name},#{s/deadguy/home/:?pane_current_path,#{b:pane_current_path},}}' set -g window-status-current-format '#{=-15:?window_name,#{window_name},#{s/deadguy/home/:?pane_current_path,#{b:pane_current_path},}}' diff --git a/.config/zsh/conf/01_teclas.zsh b/.config/zsh/conf/01_teclas.zsh index 6eb6492..dfa76f1 100644 --- a/.config/zsh/conf/01_teclas.zsh +++ b/.config/zsh/conf/01_teclas.zsh @@ -86,7 +86,6 @@ bindkey -M viins '^[[B' history-substring-search-down bindkey -M viins '^E' edit-command-line bindkey '^L' tmux-clear-screen bindkey '^X' run-with-sudo -bindkey '^G' "dotbare fedit^J" # }}} # Normal {{{ bindkey -M vicmd 'j' down-line # Override down-line-or-history. diff --git a/.config/zsh/conf/03_aliases.zsh b/.config/zsh/conf/03_aliases.zsh index 6ef3f59..53188b4 100644 --- a/.config/zsh/conf/03_aliases.zsh +++ b/.config/zsh/conf/03_aliases.zsh @@ -4,15 +4,16 @@ alias \ x='xui' \ m='neomutt' \ z='zathura' \ - g='lab' \ se='sudoedit' \ - am='alsamixer' \ + am='alsamixer -c 1' \ pm='pulsemixer' \ nb='newsboat -q' \ py='python ' \ - vdi='nvim -d' \ + vdf='nvim -d' \ + git='lab' \ irc='catgirl' \ play='ncmpcpp' \ + glow='glow -p -w 80' \ pyserv='python -m http.server' # XBPS @@ -89,7 +90,7 @@ alias \ ping='ping -c 5' \ dd='dd status=progress' \ dfc='dfc -dmT' \ - strim='mpv --jack-port="OBS Jack Input"' \ + # strim='mpv --jack-port="OBS Jack Input"' \ slrn='slrn -i ~/.config/slrn/rc -f ~/.config/slrn/jnewsrc.club --create' # Comandos diff --git a/.config/zsh/conf/05_zmarks.zsh b/.config/zsh/conf/05_zmarks.zsh index 3083a5d..b406ed3 100644 --- a/.config/zsh/conf/05_zmarks.zsh +++ b/.config/zsh/conf/05_zmarks.zsh @@ -1,4 +1,5 @@ hash -d gl=$XDG_DATA_HOME +hash -d gg=$GOPATH hash -d ga=$HOME/.local/apps hash -d gb=$HOME/.local/bin hash -d g.=$XDG_CONFIG_HOME diff --git a/.config/zsh/conf/10_plugins.zsh b/.config/zsh/conf/10_plugins.zsh index ec33ff9..2d2b8bc 100644 --- a/.config/zsh/conf/10_plugins.zsh +++ b/.config/zsh/conf/10_plugins.zsh @@ -1,5 +1,4 @@ foreach plugin ( - dotbare/dotbare.plugin.zsh zsh-autopair/autopair.plugin.zsh zsh-system-clipboard/zsh-system-clipboard.plugin.zsh zsh-history-substring-search/zsh-history-substring-search.plugin.zsh @@ -7,6 +6,5 @@ foreach plugin ( source $ZDOTDIR/conf/$plugin } -bindkey -s '^G' "dotbare fedit"^j HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1 typeset -g ZSH_SYSTEM_CLIPBOARD_TMUX_SUPPORT='true' diff --git a/.config/zsh/conf/11_lf-icons.zsh b/.config/zsh/conf/11_lf-icons.zsh index 997fab2..fdb4568 100644 --- a/.config/zsh/conf/11_lf-icons.zsh +++ b/.config/zsh/conf/11_lf-icons.zsh @@ -1,218 +1,239 @@ 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=ﯟ:\ -.Xdefaults=:\ -.Xresources=:\ -.bashprofile=:\ -.zprofile=:\ -.bashrc=:\ -.zshrc=:\ -.zshenv=:\ -.dmrc=:\ -.ds_store=:\ -.fasd=:\ -.gitconfig=:\ -.gitignore=:\ -.jack-settings=:\ -.mime.types=:\ -.nvidia-settings-rc=:\ -.pam_environment=:\ -.profile=:\ -.recently-used=:\ -.selected_editor=:\ -.vimrc=:\ -.xinputrc=:\ -.xserverrc=:\ -config=:\ -dropbox=:\ +di= :\ +fi= :\ +ln= :\ +or= :\ +ex= :\ +.git= :\ +Desktop= :\ +Documents= :\ +Downloads= :\ +Music= :\ +Pictures= :\ +Public= :\ +Templates= :\ +Videos= :\ +mail= :\ +.mail= :\ +.cache= :\ +.config= :\ +trash= :\ +Trash= :\ +bin= :\ +hexagons= :\ +xresources= :\ +xinitrc= :\ +.Xdefaults= :\ +.Xresources= :\ +.bashprofile= :\ +.zprofile= :\ +.bashrc= :\ +.zshrc= :\ +.zshenv= :\ +.dmrc= :\ +.ds_store= :\ +.fasd= :\ +.gitconfig= :\ +.gitignore= :\ +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=:\ -gruntfile.coffee=:\ -gruntfile.js=:\ -gruntfile.ls=:\ -gulpfile.coffee=:\ -gulpfile.js=:\ -gulpfile.ls=:\ -ini=:\ -ledger=:\ -license=:\ -mimeapps.list=:\ -node_modules=:\ -procfile=:\ -react.jsx=:\ -user-dirs.dirs=:\ -Makefile=:\ -TODO=:\ -LICENSE=:\ -COPYING=:\ -*.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=:\ +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= :\ +*.tlf= :\ +*.flf= :\ +*.toml= :\ +*.m3u= :\ +*.pls= :\ +*.woff=𝑾:\ +*.woff2=𝑾:\ +*.eot=𝑬:\ +*.yaml= :\ +*.yml= :\ +*.wad=ﰁ :\ +*.WAD=ﰁ :\ +*.pk3= :\ +*.doc= :\ +*.docx= :\ +*.webp= :\ +*.aseprite= :\ +*.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=:\ -*.vim=:\ -*.vimrc=:\ -*.wav=:\ -*.webm=:\ -*.xml=:\ -*.xul=:\ -*.xz=:\ -*.yml=:\ -*.zip=:\ -*.zsh=:\ -*.xcf=:\ -*.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=:\ +*.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= :\ " diff --git a/.local/bin/README.MD b/.local/bin/README.MD deleted file mode 100644 index e696588..0000000 --- a/.local/bin/README.MD +++ /dev/null @@ -1,309 +0,0 @@ -bin -=== - -Estos son los scripts que uso con mi sistema. En su gran mayoría son para -agregar funcionalidad a mi window manager, BSPWM, pero pueden ser utilizados -fuera del mismo sin demasiado problema.\ -Varios tienen a dmenu como su principal dependencia. - -## [0x0](./0x0) - -Postear texto y archivos a 0x0.st - - -## [actualizar](./actualizar) - -Chequea si hay actualizaciones a paquetes instalados y enviá una notificación. -Basado en vpnd - - -## [ae](./ae) - -Crea un listado del contenido de esta carpeta usando fzf y fd. El archivo -seleccionado es abierto en $EDITOR - - -## [agrandar](./agrandar) - -BSPWM: agrandar nodo en cualquier dirección. - - -## [bandcamp](./bandcamp) - -Solidarizar discos de bandcamp usando youtube-dl - - -## [brillo](./brillo) - -Sube y baja el brillo usando xbacklight - - -## [cachetear](./cachetear) - -Borrar el cache de paquetes viejos - - -## [cartero](./cartero) - -Chequear si hay correo. - - -## [celu](./celu) - -Para conectar el móvil a la computadora - - -## [cfg](./cfg) - -Lista algunos archivos de configuración con fzf y abre el seleccionado en -$EDITOR - - -## [corte](./corte) - -Terminar screencast - - -## [crear](./crear) - -Crear un script en esta carpeta, hacerle chmod +x y abrir en $EDITOR - - -## [deci](./deci) - -Una boludez con lolcat - - -## [disco](./disco) - -Escuchar CDs con mpv - - -## [disks](./disks) - -`du` pero mas cheto - - -## [dpi](./dpi) - -Calculo para tener la cantidad de DPI adecuada en las fonts según la pantalla. - - -## [equiset](./equiset) - -Apagar la pantalla con xset mas temprano o mas tarde según si la batería esta -puesta. - - -## [escribir](./escribir) - -Crear posts para blog usando Hugo, o notas personales. - -## [espejo](./espejo) - -2 Monitores 1 --Cup-- digo, misma imagen - - -## [exeflock4](./exeflock4) - -i3lock - - -## [fecha](./fecha) - -No uso barra, con notificaciones me arreglo mejor. - - -## [foco](./foco) - -BSPWM: enfocar nodo - - -## [fp](./fp) - -Font preview robado de alguien mas. Requiere fzf y xdo - - -## [grabar](./grabar) - -Grabar screencasts con ffmpeg. - - -## [hx](./hx) - -Dotfile manager - - -## [leer](./leer) - -Dmenu para abrir pdf con zathura - - -## [lfview](./lfview) - -Previewer de LF - - -## [minve](./minve) - -BSPWM: minimizar nodos con dmenu - - -## [monis](./monis) - -Selector de monitores - - -## [mover](./mover) - -BSPWM: mover nodo - - -## [notifocus](./notifocus) - -No uso barra, con notificaciones me arreglo mejor. - - -## [paclist](./paclist) - -Crear lista de paquetes instalados - - -## [pantallazo](./pantallazo) - -Screenshot manager - - -## [pom](./pom) - -Pomodoro timer - - -## [postear](./postear) - -Git push para Hugo - - -## [powermenu](./powermenu) - -Dmenu para power options - - -## [randbg](./randbg) - -Fondo de pantalla random con hsetroot - - -## [ref](./ref) - -Dmenu para cuando dibujo - -## [setbg](./setbg) - -Fondo de pantalla con hsetroot - - -## [sxiv-gif](./sxiv-gif) - -Ver gifs animados - - -## [sxiv-rifle](./sxiv-rifle) - -Ver todas las imágenes de una carpeta - - -## [tapa](./tapa) - -Muestra album art en una notificación. Usado con ncmpcpp - - -## [tblock](./tblock) - -Transmission blocklist - - -## [tsa](./tsa) - -Transmission add - - -## [tsb](./tsb) - -Parte de tblock - - -## [tsd](./tsd) - -Transmission con notificaciones - - -## [tv](./tv) - -Ver videos con dmenu y mpv - - -## [txbar](./txbar) - -Barra de estado para tmux - - -## [unimon](./unimon) - -Un solo monitor - - -## [upd](./upd) - -Actualizar paquetes, manpages y paclist - - -## [vent](./vent) - -BSPWM: window switcher con dmenu - - -## [vix](./vix) - -Abrir archivo en $EDITOR en otro pane de tmux. Usado con LF - - -## [wifimenu](./wifimenu) - -IWD - - -## [winclass](./winclass) - -xprop - - -## [wpadd](./wpadd) - -wifimenu pero para wpa_supplicant - - -## [xui](./xui) - -FZF para instalar paquetes - - -## [ytdl](./ytdl) - -youtube-dl - - -## [ytp](./ytp) - -youtube-dl para playlists - - -## [zu](./zu) - -Extraer archivos con tar - - ---- - -This page is generated automatically by [makebinreadme.sh](https://github.com/ssh0/dotfiles/blob/master/bin/makebinreadme.sh) - diff --git a/.local/bin/bandcamp b/.local/bin/bandcamp index b9129c7..4cf87ef 100755 --- a/.local/bin/bandcamp +++ b/.local/bin/bandcamp @@ -8,4 +8,4 @@ curl -s "$1" > "$HTML_TEMP" titulo=$(grep -Po ".*" "$HTML_TEMP" | sed 's/<[^>]*>//g') disco=${titulo% | *} grupo=${titulo#* | } -sed -n '/image_/s/.*rel="image_src"\s\+href="\([^"]\+\).*/\1/p' "$HTML_TEMP" | xargs -r curl -s --create-dirs -o "$HOME/snd/Albums/${grupo}/${disco}/cover.jpg" && echo "Listo" || echo "No pude :(" +sed -n '/image_/s/.*rel="image_src"\s\+href="\([^"]\+\).*/\1/p' "$HTML_TEMP" | xargs -r curl -s --create-dirs -o "$HOME/snd/Albums/${grupo}/${disco}/cover.jpg" && echo "Listo" || echo "No la encontre :(" diff --git a/.local/bin/cachetear b/.local/bin/cachetear index 293a760..5fb5d72 100755 --- a/.local/bin/cachetear +++ b/.local/bin/cachetear @@ -1,5 +1,5 @@ #!/bin/sh -notify-send -u critical -i ~/img/.icn/control.png "Tres meses han pasado..." "Es hora de limpiar el cache" & +notify-send -u critical -i ~/img/.icn/control.png "Limpieza Mensual" "Es hora de vaciar el cache" & sleep 10s alacritty --class=flota -e sudo xbps-remove -vO diff --git a/.local/bin/corte b/.local/bin/corte index f65983d..22b1655 100755 --- a/.local/bin/corte +++ b/.local/bin/corte @@ -10,9 +10,9 @@ if [ -f "/tmp/blaze-pid" ]; then sleep 3 kill -9 "$recpid" ) >/dev/null 2>&1 & - notify-send -t 2000 "Grabación Terminada" + notify-send -t 5000 "Grabación Terminada" exit else - notify-send -t 2000 "Grabación inactiva" + notify-send -t 5000 "Grabación inactiva" exit 1 fi diff --git a/.local/bin/deci b/.local/bin/deci index 2a2afe5..9973a51 100755 --- a/.local/bin/deci +++ b/.local/bin/deci @@ -1,6 +1,6 @@ #!/bin/sh -bla="$(printf "" | dmenu -i -l 0)" -echo " " -figlet -c -t -f 3d " $bla " | lolcat +bla="$(printf "" | rofi -theme dprompt -dmenu -p ">")" +[ -z "$bla" ] && exit 0 echo " " +alacritty -e figlet -c -t -f 3d " $bla " | lolcat diff --git a/.local/bin/escribir b/.local/bin/escribir index 4b42a00..fdacb21 100755 --- a/.local/bin/escribir +++ b/.local/bin/escribir @@ -1,8 +1,5 @@ #!/bin/sh -abrir() { ${TERMINAL:-alacritty} --class=flota -e nvim "$@"; } -listar() { ${DMENU:-dmenu} -i -w 125 "$@"; } - diario() { cd "$HOME/doc/blog" || exit menuBlog=$(printf "Hoy\\nMañana\\nAyer\\nArchivo" | listar -p " ") @@ -19,7 +16,8 @@ notas() { menuNota=$(printf "Nueva\\nArchivo" | listar -p " ") case $menuNota in "Nueva") - nombre="$(dmenu -i -p "Titulo: ")" 2>/dev/null + nombre="$(listar -theme dprompt -p "Titulo: ")" 2>/dev/null + [ -z "$nombre" ] && exit 0 abrir "$nombre".md ;; "Archivo") archivo ;; @@ -28,7 +26,7 @@ notas() { articulo() { cd "$HOME/doc/dgy.io" || exit - nombre="$(dmenu -i -p "Titulo: ")" 2>/dev/null + nombre="$(listar -theme dprompt -p "Titulo: ")" 2>/dev/null [ -z "$nombre" ] && exit 0 nombreForm="$(echo "$nombre" | tr ' ' '-')" hugo new articulos/"$nombreForm".md @@ -36,8 +34,12 @@ articulo() { abrir content/articulos/"$nombre".md } +abrir() { ${TERMINAL:-alacritty} --class=flota -e nvim "$@"; } + +listar() { rofi -dmenu "$@"; } + archivo() { - selarch=$(fd -d 1 -e md | sort -Mr | dmenu -i -w 200 -p " ") + selarch=$(fd -d 1 -e md | sort -Mr | listar -p " ") [ -z "$selarch" ] && exit 0 abrir "$selarch" } diff --git a/.local/bin/grabar b/.local/bin/grabar index af9c87c..0f59012 100755 --- a/.local/bin/grabar +++ b/.local/bin/grabar @@ -4,10 +4,11 @@ # https://github.com/cherrry9/blaze/ # modificado por deadguy -output="$HOME/vid/Screen/$(date '+%y%m%d-%H%M-%S').mp4" -m() { ${DMENU:-dmenu} "$@"; } +output="$HOME/vid/Screen/$(date '+%F_%H_%M').mp4" +fps=60 +m() { rofi -dmenu -i -no-custom "$@"; } -method="$(printf "Pantalla\nSelección" | m -w 200 -p "Grabar")" +method="$(printf "Pantalla\nSelección" | m -p " ")" if [ "$method" = "Pantalla" ]; then # get information about the display @@ -17,7 +18,7 @@ if [ "$method" = "Pantalla" ]; then 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 -w 200 -p "Pantalla")" + [ ! "$display" ] && display="$(printf "%b" "$monitors" | m -p "Pantalla")" fi set -- $(xrandr -q | grep "$display" | grep -oP '\d*x\d*\+\d*\+\d*' | tr '+x' ' ') @@ -27,7 +28,7 @@ if [ "$method" = "Pantalla" ]; then offX="$3" offY="$4" - sonido="$(printf "Sí\nNo" | m -w 200 -p "Audio")" + sonido="$(printf "Sí\nNo" | m -p "Audio")" if [ "$sonido" = "Sí" ]; then # find default audio device @@ -40,6 +41,13 @@ if [ "$method" = "Pantalla" ]; then fi elif [ "$method" = "Selección" ]; then + gif="$(printf "Sí\nNo" | m -p "Gif")" + + 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') @@ -52,15 +60,15 @@ elif [ "$method" = "Selección" ]; then [ "$((width % 2))" = 1 ] && width="$((width + 1))" [ "$((height % 2))" = 1 ] && height="$((height + 1))" else - printf "Método inválido.\n" + notify-send -t 3000 -u critical "Método inválido" exit 1 fi # ask the user if they want to start the recording -[ ! "$ready" ] && ready="$(printf "Sí\nNo" | m -w 200 -p "Empezar")" +[ ! "$ready" ] && ready="$(printf "Sí\nNo" | m -p "Empezar")" [ "$ready" = "Sí" ] && { - notify-send -t 1500 "Grabando" + notify-send -t 2000 "Grabando" ffmpeg \ -loglevel error \ @@ -70,7 +78,7 @@ fi -f x11grab \ -draw_mouse 1 \ -s "${width}x$height" \ - -r 60 \ + -r "$fps" \ -i "$DISPLAY.0+$offX,$offY" \ -pix_fmt yuv420p \ -q:v 0 \ diff --git a/.local/bin/minve b/.local/bin/minve index 3ca9190..55e730a 100755 --- a/.local/bin/minve +++ b/.local/bin/minve @@ -23,7 +23,7 @@ hide) show) [ -z "$file" ] && exit - sel=$(awk '{print $2,$3}' "$file" | dmenu -i -p ' ') + 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 72c14c1..7d31881 100755 --- a/.local/bin/monis +++ b/.local/bin/monis @@ -1,11 +1,11 @@ #!/bin/sh -conectados=$(xrandr -q | awk '/ connected/ {count++} END {print count}') -pri=$(xrandr -q | awk '/ connected/ {print $1}' | sed -sn 1p) -sec=$(xrandr -q | awk '/ connected/ {print $1}' | sed -sn 2p) +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 -q | awk '/ disconnected/ {print "--output", $1, "--off"}' | paste -sd ' ')" + 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 579688b..f987dfa 100755 --- a/.local/bin/pantallazo +++ b/.local/bin/pantallazo @@ -1,12 +1,20 @@ #!/bin/sh -file=$HOME/img/scrot/"$(date +%H_%M)".png +file=$HOME/img/scrot/"$(date +%F_%H_%M)".png vent=$(bspc query -N -n .focused) -case "$(printf "Seleccion\\nVentana\\nPantalla\\nCopiar seleccion\\nCopiar ventana\\nCopiar pantalla" | dmenu -w 200 -p " ")" in +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") maim -u "$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 ;; diff --git a/.local/bin/powermenu b/.local/bin/powermenu index 3e0c5d2..8062191 100755 --- a/.local/bin/powermenu +++ b/.local/bin/powermenu @@ -1,11 +1,11 @@ #!/bin/sh -chosen="$(printf "Apagar\\nReiniciar\\nSuspender\\nBloquear\\nSalir" | dmenu -w 150 -i -p "⏻ ")" +chosen="$(printf "Apagar\\nReiniciar\\nSuspender\\nBloquear\\nSalir" | rofi -dmenu -p " ")" case $chosen in - "Apagar") loginctl poweroff;; - "Reiniciar") loginctl reboot;; - "Suspender") loginctl suspend;; - "Bloquear") xset s activate;; - "Salir") loginctl terminate-user "$(id -u "$USER")";; - *) exit 0;; +"Apagar") loginctl poweroff ;; +"Reiniciar") loginctl reboot ;; +"Suspender") loginctl suspend ;; +"Bloquear") xset s activate ;; +"Salir") loginctl terminate-user "$(id -u "$USER")" ;; +*) exit 0 ;; esac diff --git a/.local/bin/ref b/.local/bin/ref index cffe9db..0eb12bf 100755 --- a/.local/bin/ref +++ b/.local/bin/ref @@ -4,7 +4,7 @@ MAINDIR="$HOME/doc/" PIX="pixels" PET="c64" -MENU="$(printf "Pixels\\nPetscii" | dmenu -w 150 -p " ")" +MENU="$(printf "Pixels\\nPetscii" | rofi -dmenu -p " ")" case $MENU in 'Pixels') sxiv-rifle "$MAINDIR/$PIX/ref" >/dev/null 2>&1 ;; 'Petscii') sxiv-rifle "$MAINDIR/$PET/ref" >/dev/null 2>&1;; diff --git a/.local/bin/strim b/.local/bin/strim index 93a5972..3397d30 100755 --- a/.local/bin/strim +++ b/.local/bin/strim @@ -4,20 +4,19 @@ INRES="1920x1080" OUTRES="1280x720" -FPS="25" +FPS="24" GOP="$((FPS * 2))" GOPMIN="$FPS" CBR="2500k" QUALITY="ultrafast" AUDIO_RATE="44100" -TEXT_X="(w-text_w)/2" +TEXT_X="W-(W+tw)*mod(t,10)/10" TEXT_Y="5" -TEXT_BG="1" -TEXT_BG_COLOR="black" +TEXT_BORDER_COLOR="black" TEXT_BORDER="5" FONT_COLOR="white" FONT_SIZE="24" -FONT="$XDG_DATA_HOME/fonts/NikkyouSans-B6aV.ttf" +FONT="$XDG_DATA_HOME/fonts/SanFrancisco/SF-Pro-Display-Regular.otf" TEXT="$HOME/doc/strimtext.txt" SERVER="live-sao" STREAM_KEY="$(pass dgy-twitch)" @@ -49,5 +48,5 @@ ffmpeg \ -acodec aac \ -b:a 160k \ -bufsize $CBR \ - -vf "drawtext=fontfile='$FONT':textfile='$TEXT':reload=1:x='$TEXT_X':y='$TEXT_Y':fontsize='$FONT_SIZE':fontcolor='$FONT_COLOR':box='$TEXT_BG':boxcolor='$TEXT_BG_COLOR':boxborderw='$TEXT_BORDER'" \ + -vf "drawtext=fontfile='$FONT':textfile='$TEXT':reload=1:x='$TEXT_X':y='$TEXT_Y':fontsize='$FONT_SIZE':fontcolor='$FONT_COLOR':bordercolor='$TEXT_BORDER_COLOR':borderw='$TEXT_BORDER'" \ "rtmp://$SERVER.twitch.tv/app/$STREAM_KEY" diff --git a/.local/bin/tv b/.local/bin/tv index 4477278..8a6be6e 100755 --- a/.local/bin/tv +++ b/.local/bin/tv @@ -1,32 +1,34 @@ #!/bin/sh -tutos(){ - tutodir="$HOME/vid/Learning/" +m="rofi -dmenu -i -no-custom" - cd "$tutodir" || exit - sel=$(fd -d 1 | dmenu -i -p " ") - [ -z "$sel" ] && exit 0 - cd "$tutodir/$sel" || exit - play=$(fd -d 1 | sort -d | dmenu -i -p " ") - [ -z "$play" ] && exit 0 - mpv "$play" +tutos() { + tutodir="$HOME/vid/Learning/" + + cd "$tutodir" || exit + sel=$(fd -d 1 | $m -p " ") + [ -z "$sel" ] && exit 0 + cd "$tutodir/$sel" || exit + play=$(fd -d 1 | sort -d | $m -p " ") + [ -z "$play" ] && exit 0 + mpv "$play" } -tele(){ - canal="$(dmenu -i -p " ")" 2> /dev/null +tele() { + canal="$(rofi -theme dprompt -dmenu -i -p " ")" [ -z "$canal" ] && exit 0 mpv https://twitch.tv/"$canal" } -shutub(){ - video="$(dmenu -i -p " ")" 2> /dev/null +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" | dmenu -i -w 120 -p "磊 ")" +MENU="$(printf "Twitch\\nYoutube\\nTuto" | $m -p " ")" case $MENU in - 'Twitch') tele;; - 'Youtube') shutub;; - 'Tuto') tutos;; +'Twitch') tele ;; +'Youtube') shutub ;; +'Tuto') tutos ;; esac diff --git a/.local/bin/unimon b/.local/bin/unimon index dfdfd74..fe0e2a7 100755 --- a/.local/bin/unimon +++ b/.local/bin/unimon @@ -1,8 +1,8 @@ #!/bin/sh -pri=$(xrandr -q | awk '/ connected/ {print $1}' | sed -sn 1p) +pri=$(xrandr | awk '( $2 == "connected" ) { print $1 }' | sed -sn 1p) -xrandr --output "$pri" --primary --auto --scale 1.0x1.0 "$(xrandr -q | awk '/ disconnected/ {print "--output", $1, "--off"}' | paste -sd ' ')" +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 diff --git a/.local/bin/vent b/.local/bin/vent index 7fa8079..656f757 100755 --- a/.local/bin/vent +++ b/.local/bin/vent @@ -14,5 +14,5 @@ done switch="$switch *) ;;" -selection="$(printf '%s' "$titles" | dmenu -p " " "$@")" +selection="$(printf '%s' "$titles" | rofi -dmenu -p " " "$@")" eval "case \"$selection\" in $switch esac" diff --git a/.local/bin/wifimenu b/.local/bin/wifimenu index c28bcfb..572ae7e 100755 --- a/.local/bin/wifimenu +++ b/.local/bin/wifimenu @@ -11,8 +11,8 @@ add() { list_all=$(iwctl station "$interface" get-networks | awk 'NR > 4 && $0 !~ /^$/ && $0 !~ />/ { print $1}') list_known=$(iwctl known-networks list | awk 'NR>4 && $0 !~ /^$/ { print $1 }') list=$(comm -23 <(sort -u <<<"$list_all") <(sort -u <<<"$list_known")) - ssid=$(printf "%s" "$list" | m -i -p "add") || return - pass=$(m -P) || return + ssid=$(printf "%s" "$list" | m -i -p "Add") || return + pass=$(m -P -p " ") || return if iwctl --passphrase "$pass" station $interface connect "$ssid"; then notify-send "Agregué $ssid" @@ -55,12 +55,12 @@ forget() { scan() { iwctl station $interface scan - notify-send "Scanneando..." + notify-send "Scaneando..." } while true; do options="Scanear\nAgregar\nCambiar\nOlvidar" - choice=$(printf "%b" "$options" | m -i -w 150 -p " ") || exit + choice=$(printf "%b" "$options" | m -i -p " ") || exit case $choice in "Scanear") scan ;; "Agregar") add ;; diff --git a/.zshenv b/.zshenv index da6c2ef..6deb055 100644 --- a/.zshenv +++ b/.zshenv @@ -8,7 +8,7 @@ fi export VISUAL="$EDITOR" export GIT_EDITOR="$EDITOR" export TERMINAL="alacritty" -export BROWSER="${${DISPLAY:-lynx}:+firefox}" +export BROWSER="${${DISPLAY:-elinks}:+firefox}" export COLORTERM="truecolor" export OPENER="xdg-open" export PAGER="less" @@ -43,9 +43,8 @@ export HIGHLIGHT_OPTIONS='--out-format="ansi" --style="pablo"' export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" export QT_QPA_PLATFORMTHEME="gtk3" export LYNX_LSS="${XDG_CONFIG_HOME:-$HOME/.config}/lynx.lss" +export ELINKS_CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}/elinks" export NNTPSERVER="news.tilde.club" -export DOTBARE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/hexagons" -export DOTBARE_TREE="$HOME" _JAVA_OPTIONS="-Djava.util.prefs.userRoot=${XDG_DATA_HOME:-$HOME/.local/share}/java " _JAVA_OPTIONS+="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true " @@ -62,6 +61,8 @@ export FZF_DEFAULT_OPTS="--cycle \ --inline-info \ --no-bold \ --ansi \ + --pointer='🡢' \ + --marker='⦁' \ --preview-window :wrap:noborder" export FZF_DEFAULT_COMMAND="fd -t f -c always -H" @@ -86,6 +87,6 @@ export LESSHISTFILE="-" # }}} # Path {{{ typeset -U PATH path -path=(~/.local/bin ~/.config/yarn/bin ~/.local/share/npm/bin ~/.local/wm/katriawm/src/core ~/.local/wm/nhkd $path[@]) +path=(~/.local/bin ~/.config/yarn/bin ~/.local/share/npm/bin $path[@]) # }}} # vim:foldmethod=marker:foldlevel=0 diff --git a/doc/xbpaketes b/doc/xbpaketes index 3f72f79..d4c324b 100644 --- a/doc/xbpaketes +++ b/doc/xbpaketes @@ -1,14 +1,8 @@ ImageMagick -SDL-32bit alacritty -alsa-firmware -alsa-lib-devel -alsa-plugins alsa-plugins-ffmpeg alsa-plugins-jack alsa-plugins-pulseaudio -alsa-plugins-samplerate -alsa-plugins-speex alsa-utils android-udev-rules ansible @@ -17,32 +11,39 @@ base-system bat bc bspwm -cadence catgirl chrony cpupower -crispy-doom cryptsetup ctags delta +delve dfc dracut dunst +elinks elogind +faac fd ffmpeg figlet file-roller firefox +fluidsynth freepats fzf gcc +giada git git-extras git-libsecret glibc-32bit +glow gnome-ssh-askpass gnupg2 +go +golangci-lint +gopls grub-i386-efi grub-x86_64-efi gzdoom @@ -54,31 +55,22 @@ hub i3lock-color intel-ucode isync -j4-dmenu-desktop -jack-devel +iwd +jack jq keychain -klystrack krita lf -libXfixes-devel -libXft-devel -libXinerama-devel -libXrandr-devel -libfluidsynth -libjack-32bit libopenal libressl-devel librsvg librsvg-utils -libsndfile-devel libstdc++-32bit libva-intel-driver lm_sensors lynx maim mdadm -mediainfo mlocate mpc mpd @@ -91,13 +83,12 @@ neovim neovim-remote newsboat nfs-utils -nftables +nicotine+ nodejs notmuch noto-fonts-cjk noto-fonts-emoji noto-fonts-ttf -openjdk11 p7zip pass patch @@ -111,10 +102,11 @@ pulsemixer python3 python3-ansible-lint python3-pip +qjackctl +revive ripgrep rkhunter rofi -runit-nftables setxkbmap shellcheck shfmt @@ -132,7 +124,6 @@ toilet transmission tremc udevil -ueberzug unclutter-xfixes unrar unzip @@ -164,6 +155,5 @@ zathura zathura-cb zathura-pdf-mupdf zip -zita-ajbridge zsh zsh-syntax-highlighting