From c246e5972fb017d7ce7e3f1c969c096043a9f91b Mon Sep 17 00:00:00 2001 From: deadguy Date: Tue, 7 Jul 2020 20:12:28 -0300 Subject: [PATCH] script para postear en hugopage, deadwiki, newsboat --- .config/X11/xresources | 2 +- .config/bspwm/bspwmrc | 1 - .config/gtk-2.0/gtkrc-2.0 | 2 +- .config/gtk-3.0/settings.ini | 2 +- .config/newsboat/config | 83 ++++++++++++++++++++++++++ .config/nvim/ftdetect/vimwiki.vim | 4 ++ .config/nvim/ftplugin/markdown.vim | 19 ++++++ .config/nvim/init.vim | 22 ++++--- .config/nvim/templates/correo.skeleton | 6 ++ .config/nvim/templates/wiki.skeleton | 8 +++ .config/sxhkd/sxhkdrc | 9 ++- .config/zsh/.zshrc | 6 +- .config/zsh/aliases.zsh | 2 +- .local/bin/cfg | 4 +- .local/bin/escribir | 2 +- .local/bin/grabar | 19 ++++-- .local/bin/monis | 4 +- .local/bin/postear | 5 ++ .zshenv | 2 +- doc/xbpaketes | 19 ++---- 20 files changed, 176 insertions(+), 45 deletions(-) create mode 100644 .config/newsboat/config create mode 100644 .config/nvim/ftplugin/markdown.vim create mode 100644 .config/nvim/templates/correo.skeleton create mode 100644 .config/nvim/templates/wiki.skeleton create mode 100755 .local/bin/postear diff --git a/.config/X11/xresources b/.config/X11/xresources index 5cafcbb..238676c 100644 --- a/.config/X11/xresources +++ b/.config/X11/xresources @@ -35,7 +35,7 @@ *.color7: #a89984 *.color15: #ffffff -dmenu.font: ChicagoFLF:pixelsize=16:antialias=true:autohint=true; +dmenu.font: System Charcoal:pixelsize=16:antialias=true:autohint=true; dmenu.background: #d8d8d8 dmenu.foreground: #380000 dmenu.selbackground: #fccb00 diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index a611647..8372c87 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -43,7 +43,6 @@ bspc config active_border_color "$(get_xrdb color8)" bspc config presel_feedback_color "$(get_xrdb color6)" # Flotantes -bspc rule -a Pavucontrol state=floating bspc rule -a Catia state=floating bspc rule -a Cadence state=floating bspc rule -a mpv state=floating diff --git a/.config/gtk-2.0/gtkrc-2.0 b/.config/gtk-2.0/gtkrc-2.0 index 931757a..aefa53f 100644 --- a/.config/gtk-2.0/gtkrc-2.0 +++ b/.config/gtk-2.0/gtkrc-2.0 @@ -4,7 +4,7 @@ include "/home/deadguy/.config/gtk-2.0/gtkrc-2.0.mine" gtk-theme-name="Haiku" gtk-icon-theme-name="Haiku" -gtk-font-name="ChicagoFLF 10" +gtk-font-name="System Charcoal 10" gtk-cursor-theme-name="HaikuHandRe" gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index 9591033..f435c44 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -3,7 +3,7 @@ gtk-application-prefer-dark-theme=1 gtk-cursor-theme-name=HaikuHandRe gtk-theme-name=Haiku gtk-icon-theme-name=Haiku -gtk-font-name=ChicagoFLF 10 +gtk-font-name=System Charcoal 10 gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR diff --git a/.config/newsboat/config b/.config/newsboat/config new file mode 100644 index 0000000..fc6b7ec --- /dev/null +++ b/.config/newsboat/config @@ -0,0 +1,83 @@ +# opciones basicas +always-display-description yes +display-article-progress yes +reload-only-visible-feeds yes +auto-reload yes +show-keymap-hint no +text-width 80 +max-items 50 +history-limit 0 +user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" +error-log "~/.config/newsboat/error.log" + +# formatos +highlight feedlist "──.*" yellow default +feedlist-format "%?T? %U %t &── %t ────────────────────────?" +datetime-format "%F" +feedlist-title-format "Feeds: %u/%t %?T?Tag: %T ? %> %N %V" +itemview-title-format " " +articlelist-format "%f %t %> %D" +articlelist-title-format "%T: %u sin leer %> %U" +searchresult-title-format "Resultados (%u sin leer, %t total)" +filebrowser-title-format "%f %?O?Open File&Save File?" +help-title-format "Ayuda" +selecttag-title-format "Elegir Etiqueta" +selectfilter-title-format "Elegir Filtro" +urlview-title-format "URLs" +dialogs-title-format "Dialogs" +notify-format "%d Artículos nuevos. %n Artículos no leídos" + +# colores +color listnormal cyan default +color listfocus yellow default bold +color listnormal_unread color12 default +color listfocus_unread black yellow standout bold +color info red default bold +color article white default + +highlight article "^Feed:.*" color5 default +highlight article "^Title:.*" color3 default bold +highlight article "^Author:.*" color2 default +highlight article "^Date:.*" color7 default +highlight article "^Link:.*" color4 default +highlight article "^Flags:.*" color9 color0 +highlight article "\\[[0-9][0-9]*\\]" color12 default +highlight article "\\[image [0-9][0-9]*\\]" color109 default bold +highlight article "\\[embedded flash: [0-9][0-9]*\\]" color12 default + +# teclas +bind-key ; toggle-show-read-feeds +bind-key j down +bind-key k up +bind-key J next-feed articlelist +bind-key K prev-feed articlelist +bind-key G end +bind-key g home +bind-key d pagedown +bind-key u pageup +bind-key l open +bind-key h quit +bind-key a toggle-article-read +bind-key n next-unread +bind-key N prev-unread +bind-key D pb-download +bind-key U show-urls +bind-key x pb-delete +bind-key ^t next-unread +bind-key / open-search + +# programas externos +notify-program "notify-send" +browser linkhandler +player mpv +save-path ~/.config/newsboat/saved + +# macros con prefijo +macro , open-in-browser +macro d set browser "ytdl"; open-in-browser ; set browser linkhandler +macro a set browser "bandcamp"; 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 r set browser "tmux split-window -hp 60 && tmux send-keys 'tuir -l %u && tmux kill-pane\n'"; open-in-browser ; set browser linkhandler + +# vim: ft=conf cms=#%s diff --git a/.config/nvim/ftdetect/vimwiki.vim b/.config/nvim/ftdetect/vimwiki.vim index 1c91928..3f3af78 100644 --- a/.config/nvim/ftdetect/vimwiki.vim +++ b/.config/nvim/ftdetect/vimwiki.vim @@ -1 +1,5 @@ autocmd BufRead,BufNewFile *.wiki setlocal filetype=markdown + +autocmd bufnewfile ~/doc/blog/*.wiki call append(1, 'Date: ') +autocmd BufNewFile,BufReadPre ~/doc/blog/*.wiki exe "g/Date: */s/Date: /# " .strftime("%F") +autocmd bufnewfile,Bufwritepre,filewritepre ~/doc/blog/*.wiki execute "normal Go" diff --git a/.config/nvim/ftplugin/markdown.vim b/.config/nvim/ftplugin/markdown.vim new file mode 100644 index 0000000..04ba07c --- /dev/null +++ b/.config/nvim/ftplugin/markdown.vim @@ -0,0 +1,19 @@ +setlocal nonumber norelativenumber laststatus=0 showmode +setlocal signcolumn=no textwidth=80 wrap sw=2 +setlocal tabstop=2 expandtab softtabstop=2 linebreak +setlocal autoindent noruler colorcolumn=80 +setlocal spell spelllang=es,en_us,cjk +set complete+=kspell + +" Spellcheck +nnoremap [s +nnoremap ]s +nnoremap z= +nnoremap z=1 +nnoremap zg + +" Todo list +nnoremap i-[] +nnoremap :.s/\[\]/\[x\] +inoremap -[] +inoremap :.s/\[\]/\[x\] diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 5b02a4f..dd9264f 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -123,7 +123,7 @@ if !exists('autocommands_loaded') && has('autocmd') aug miscs au CursorHold * silent call CocActionAsync('highlight') - au CursorHold * call CocActionAsync('doHover') + " au CursorHold * call CocActionAsync('doHover') au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') au ColorScheme * call MyHighlights() aug END @@ -140,7 +140,7 @@ if !exists('autocommands_loaded') && has('autocmd') aug skeletons au BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton au BufNewFile *.sh 0r ~/.config/nvim/templates/sh.skeleton - au BufNewFile ~/doc/blog/*.wiki :silent 0r !diario.py % + au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton aug END aug file_types @@ -175,8 +175,8 @@ let g:ale_lint_on_insert_leave = 1 let g:ale_fix_on_save = 1 let g:ale_close_preview_on_insert = 1 let g:ale_sign_highlight_linenrs = 1 -let g:ale_sign_error = '✖' -let g:ale_sign_warning = '⚠' +let g:ale_sign_error = '' +let g:ale_sign_warning = '' let g:ale_sign_info = '●' let g:ale_virtualtext_cursor = 1 let g:ale_loclist_msg_format = '[%linter%] %s% (code)% [%severity%]' @@ -251,7 +251,11 @@ function! s:check_back_space() abort endfunction " to confirm completion -inoremap pumvisible() ? "\" : "\" +if exists('*complete_info') + inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" +else + inoremap pumvisible() ? "\" : "\u\" +endif " Use to trigger completion. inoremap coc#refresh() @@ -260,7 +264,7 @@ inoremap coc#refresh() nnoremap gd (coc-definition) nnoremap gr (coc-references) -" Use K to show documentation in preview window. +" Use D to show documentation in preview window. nnoremap D :call show_documentation() function! s:show_documentation() @@ -283,12 +287,12 @@ let g:jsx_ext_required = 1 let g:tex_flavor='latex' let g:tex_conceal='abdmg' let g:Tex_DefaultTargetFormat ='pdf' -let g:vimtex_motion_matchparen = 0 -let g:vimtex_complete_enable = 1 let g:vimtex_compiler_progname = 'nvr' -let g:vimtex_view_use_temp_files = 2 let g:vimtex_view_method = 'zathura' +let g:vimtex_motion_matchparen = 0 let g:vimtex_quickfix_mode = 0 +let g:vimtex_complete_enable = 1 +let g:vimtex_view_use_temp_files = 2 "}}} " Plugins {{{ call plug#begin(stdpath('data') . '/plugged') diff --git a/.config/nvim/templates/correo.skeleton b/.config/nvim/templates/correo.skeleton new file mode 100644 index 0000000..4b963dd --- /dev/null +++ b/.config/nvim/templates/correo.skeleton @@ -0,0 +1,6 @@ +From: +To: +Cc: +Bcc: +Subject: + diff --git a/.config/nvim/templates/wiki.skeleton b/.config/nvim/templates/wiki.skeleton new file mode 100644 index 0000000..553ad68 --- /dev/null +++ b/.config/nvim/templates/wiki.skeleton @@ -0,0 +1,8 @@ + + +## To Do + + + +## Notas + diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 7943307..3fad92a 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -14,6 +14,9 @@ super + {1-9,0} super + shift + {1-9,0} bspc node -d {1-9,10} +super + ctrl + {1-9,0} + id=$(bspc query -N -n); bspc node -d {1-9,10}; bspc node -f ${id} + super + {_,shift} + ntilde minve {hide,dmenu} @@ -29,6 +32,9 @@ super + {Up,Down,Left,Right} super + y bspc node -s biggest.local +super + shift + {d,a} + bspc node @/ -C {forward,backward} + super + {_,shift,ctrl} + u bspc node {@/ -B,@brother -B,@/ -E} @@ -48,9 +54,6 @@ super + {a,x,i,v,z} super + space j4-dmenu-desktop --dmenu="dmenu -i -w 250 -p ' ' " --no-generic -super + e - dmenu_run -p " " - super + {F1,F2,F3,F4} {fecha,tapa,notifocus,touchpad} diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 743b6ec..c549f01 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -92,11 +92,11 @@ function () { local LVL=$SHLVL fi if [[ $EUID -eq 0 ]]; then - local SUFFIX='%F{yellow}%n%f'$(printf '%%F{yellow}\uf460%.0s%%f' {1..$LVL}) + local SUFFIX='%F{yellow}%n%f'$(printf '%%F{yellow}>%.0s%%f' {1..$LVL}) else - local SUFFIX=$(printf '\uf460%.0s%%f' {1..$LVL}) + local SUFFIX=$(printf '>%.0s%%f' {1..$LVL}) fi -export PS1="%(?..%{%F{red}%}(%?%)%{%f%} )%F{green}${SSH_TTY:+%n@%m}%f%B${SSH_TTY:+:}%b%F{blue}%B%2~%b%F{yellow}%B%(1j.*.)%b%f %B${SUFFIX}%b " +export PROMPT="%(?..%{%F{red}%}(%?%)%{%f%} )%F{green}${SSH_TTY:+%n@%m}%f%B${SSH_TTY:+:}%b%F{blue}%B%2~%b%F{yellow}%B%(1j.*.)%b%f %B${SUFFIX}%b " if [[ -n "$TMUXING" ]]; then # Outside tmux, ZLE_RPROMPT_INDENT ends up eating the space after PS1, and # prompt still gets corrupted even if we add an extra space to compensate. diff --git a/.config/zsh/aliases.zsh b/.config/zsh/aliases.zsh index e67b716..8bc9208 100644 --- a/.config/zsh/aliases.zsh +++ b/.config/zsh/aliases.zsh @@ -6,7 +6,7 @@ alias \ m='neomutt' \ am='alsamixer' \ pm='pulsemixer' \ - nb='newsboat' \ + nb='newsboat -q' \ v='$EDITOR' \ play='ncmpcpp' \ py='python ' \ diff --git a/.local/bin/cfg b/.local/bin/cfg index d1aedaf..5ab9e84 100755 --- a/.local/bin/cfg +++ b/.local/bin/cfg @@ -4,8 +4,8 @@ function () { # Bookmarks local -A bookmarks=( 'nvim' '~/.config/nvim/init.vim' - 'gtk 2' '~/.config/gtk-2.0/gtkrc-2.0' - 'gtk 3' '~/.config/gtk-3.0/settings.ini' + 'gtk2' '~/.config/gtk-2.0/gtkrc-2.0' + 'gtk3' '~/.config/gtk-3.0/settings.ini' 'lf' '~/.config/lf/lfrc' 'preview' '~/.local/bin/lfview' 'mpv' '~/.config/mpv/mpv.conf' diff --git a/.local/bin/escribir b/.local/bin/escribir index 06da091..87dfa53 100755 --- a/.local/bin/escribir +++ b/.local/bin/escribir @@ -24,7 +24,7 @@ notas() { } articulo(){ - cd "$HOME/doc/articulos" || exit + cd "$HOME/doc/dgy.io" || exit nom="$(dmenu -i -p "Titulo: ")" 2> /dev/null nombre="$(echo "$nom" | tr ' ' '-')" hugo new articulos/"$nombre".md diff --git a/.local/bin/grabar b/.local/bin/grabar index 3282398..e7925f4 100755 --- a/.local/bin/grabar +++ b/.local/bin/grabar @@ -1,5 +1,14 @@ #!/bin/sh +M=$(bspc query -M --names) +NUM=$(echo "$M" | awk 'END{print NR}') + +if [ "$NUM" = 1 ]; then + pant=-video_size 1366x768 -i :0.0 +elif [ "$NUM" = 2 ]; then + pant=$() +fi + killrecording() { recpid="$(cat /tmp/recordingpid)" # kill with SIGTERM, allowing finishing touches. @@ -70,10 +79,10 @@ audio() { \ } askrecording() { \ - choice=$(printf "Screencast\\nVideo only\\nAudio\\nJack Screencast\\nJack Audio" | dmenu -i -w 200 -p " ") + choice=$(printf "Screencast\\nVideo\\nAudio\\nJack Screencast\\nJack Audio" | dmenu -i -w 200 -p " ") case "$choice" in "Screencast") screencast;; - "Video only") mute;; + "Video") mute;; "Audio") audio;; "Jack Screencast") jackv;; "Jack Audio") jacka;; @@ -81,13 +90,13 @@ askrecording() { \ } asktoend() { \ - response=$(printf "No\\nYes" | dmenu -i -w 220 -p "End recording? ") && - [ "$response" = "Yes" ] && killrecording + response=$(printf "No\\nSi" | dmenu -i -w 220 -p "Cortar? ") && + [ "$response" = "Si" ] && killrecording } case "$1" in "Screencast") screencast;; - "Video only") mute;; + "Video") mute;; "Audio") audio;; "Jack Screencast") jackv;; "Jack Audio") jacka;; diff --git a/.local/bin/monis b/.local/bin/monis index 719d1b8..27c41fc 100755 --- a/.local/bin/monis +++ b/.local/bin/monis @@ -9,13 +9,13 @@ ettin() { setbg bspc monitor LVDS1 -d 1 2 3 4 5 bspc monitor "$sec" -d 6 7 8 9 10 - bspc rule -a Firefox:Navigator state=tiled, desktop='^6' + bspc rule -a Firefox:Navigator state=tiled desktop='^6' } cyclops() { xrandr --output LVDS1 --primary --auto --scale 1.0x1.0 "$(echo "$M" | awk '! /LVDS1/ {print "--output", $1, "--off"}' | paste -sd ' ')" bspc monitor -d 1 2 3 4 5 6 7 8 9 10 - bspc rule -a Firefox:Navigator state=tiled, desktop='^2' + bspc rule -a Firefox:Navigator state=tiled desktop='^2' } if [ "$NUM" = 1 ]; then diff --git a/.local/bin/postear b/.local/bin/postear new file mode 100755 index 0000000..02b84d5 --- /dev/null +++ b/.local/bin/postear @@ -0,0 +1,5 @@ +#!/bin/sh + +cd "$HOME/doc/dgy.io" || exit +git add content/articulos/* && git commit -m "nuevo post" +git push diff --git a/.zshenv b/.zshenv index b44de6f..28bcb5c 100644 --- a/.zshenv +++ b/.zshenv @@ -27,7 +27,7 @@ export BAT_STYLE="numbers,changes,header" export BAT_THEME="TwoDark" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" -export QT_QPA_PLATFORMTHEME="gtk2" +export QT_QPA_PLATFORMTHEME="gtk3" export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" export XDG_DATA_HOME="$HOME/.local/share" diff --git a/doc/xbpaketes b/doc/xbpaketes index ae2eda7..84772ca 100644 --- a/doc/xbpaketes +++ b/doc/xbpaketes @@ -17,26 +17,25 @@ bat bc bspwm cadence -cantarell-fonts chrony connman connman-ncurses crispy-doom cryptsetup ctags +dejavu-fonts-ttf delta dfc dunst elogind +entr faac fd fdk-aac-devel fdkaac -feh ffmpeg figlet firefox -font-cozette fzf gallery-dl gcc @@ -65,10 +64,9 @@ lf libfluidsynth libressl-devel librsvg +librsvg-utils libsndfile-devel linux5.6 -lutris -lxappearance lynx maim mblaze @@ -78,12 +76,10 @@ mlocate mmutils mpc mpd -mps-youtube mpv msmtp ncmpcpp ncurses-term -neomutt neovim neovim-remote newsboat @@ -95,9 +91,11 @@ noto-fonts-cjk noto-fonts-emoji noto-fonts-ttf obs +openjdk11 p7zip pass patch +pd perl-File-MimeInfo pinentry-gtk pinentry-tty @@ -120,7 +118,6 @@ python3-pycodestyle python3-pyflakes python3-vint python3-yapf -rofi setxkbmap shellcheck simple-mtpfs @@ -138,16 +135,10 @@ unclutter-xfixes unrar unzip vice -void-repo-multilib -void-repo-multilib-nonfree void-repo-nonfree vsv weechat weechat-python -wine -wine-gecko -wine-mono -wine-tools xbacklight xclip xcompmgr