From b9c86e43e9601c0a12bf54c692f150eb1856b217 Mon Sep 17 00:00:00 2001 From: deadguy Date: Mon, 28 Dec 2020 09:50:51 -0300 Subject: [PATCH] Limpieza y mejoras adapte los scripts para escribir y postear a mis muchos blogs en tilde y ademas les arregle un par de descuidos. voy a ver si consigo ayuda para mejorarlos un poco mas. mejore una cosita del prompt para que sean menos lineas con el mismo resultado y arregle el tema del cursor que no cambiaba a veces. todo lo demas es mantenimiento, sacar cosas agregar cosas etc. --- .config/X11/xinitrc | 1 - .config/fontconfig/conf.d/68-color-emoji.conf | 2 +- .config/fontconfig/fonts.conf | 14 -------- .config/lf/lfrc | 11 +++--- .config/mpv/mpv.conf | 2 +- .../neomutt/neomuttrc.d/bindings.neomuttrc | 4 +-- .../neomutt/neomuttrc.d/powerline.neomuttrc | 6 ++-- .config/nvim/plugin/autocmds.vim | 3 +- .config/sxhkd/sxhkdrc | 6 ++-- .config/zsh/conf/00_prompt.zsh | 23 +++++------- .config/zsh/conf/03_aliases.zsh | 7 ++-- .local/bin/escribir | 11 +++--- .local/bin/postear | 35 +++++++++++++++++-- doc/xbpaketes | 6 ++-- 14 files changed, 69 insertions(+), 62 deletions(-) diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index 6d6ecee..e95ed2b 100644 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -3,7 +3,6 @@ setxkbmap -option caps:escape xsetroot -cursor_name left_ptr & equiset & -mpd & xss-lock -l -- exeflock4 & xrdb -merge "$XDG_CONFIG_HOME/X11/xresources" monis & diff --git a/.config/fontconfig/conf.d/68-color-emoji.conf b/.config/fontconfig/conf.d/68-color-emoji.conf index 5b7e8ca..0bd9b0a 100644 --- a/.config/fontconfig/conf.d/68-color-emoji.conf +++ b/.config/fontconfig/conf.d/68-color-emoji.conf @@ -21,5 +21,5 @@ true - + diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index f7e5415..f9419f0 100644 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -59,18 +59,4 @@ true - - - - - - - - Fantasque Sans Mono - - - ss01 - - - diff --git a/.config/lf/lfrc b/.config/lf/lfrc index c96eaf9..11ced05 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -249,7 +249,6 @@ map . set hidden! map ~ no_preview map | top map ¿ bottom -map R reload map x clear map dd cut map yy copy @@ -271,8 +270,8 @@ map D %mv -i $fs . 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 zf $hx add $fs +map zd $hx add $fs . map zn newfold map i push A # at the very beginning @@ -282,9 +281,9 @@ map a push A # after extension map B bulkrename map L :Link -map f fzf_jump #goto dir -map / $lf -remote "send $id select \"$(FZF_DEFAULT_COMMAND='fd --max-depth=1' fzf)\"" #local dir find -map F $find | lf -remote "send $id select $(fzf --reverse --border --margin 2% --inline-info --color border:#005688,bg+:#16252E,fg+:#26c6da,hl+:#ffffff,hl:#26c6da)" #global find +map f fzf_jump +map / $lf -remote "send $id select \"$(FZF_DEFAULT_COMMAND='fd --max-depth=1' fzf)\"" +map F $find | lf -remote "send $id select $(fzf --reverse --border --margin 2% --inline-info --color border:#005688,bg+:#16252E,fg+:#26c6da,hl+:#ffffff,hl:#26c6da)" # Movement map gR cd / diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index e5bba8f..aaffc46 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -13,6 +13,7 @@ stop-playback-on-init-failure=yes idle=once osc=yes ytdl-format=bestvideo[height<=?1080]+bestaudio/best +ytdl-raw-options=youtube-skip-dash-manifest=,no-call-home=,no-cache-dir=,geo-bypass= screenshot-format=png screenshot-directory="~/img/scrot" osd-level=1 @@ -36,7 +37,6 @@ sub-fix-timing=no sub-ass-force-style=Kerning=yes sub-use-margins sub-ass-force-margins -cache-secs=300 cursor-autohide=1000 prefetch-playlist=yes hls-bitrate=max diff --git a/.config/neomutt/neomuttrc.d/bindings.neomuttrc b/.config/neomutt/neomuttrc.d/bindings.neomuttrc index 6348d10..224f6b7 100644 --- a/.config/neomutt/neomuttrc.d/bindings.neomuttrc +++ b/.config/neomutt/neomuttrc.d/bindings.neomuttrc @@ -50,9 +50,9 @@ macro index A "all\n" "show all messages (undo limit)" macro browser h '..' "Go to parent folder" +macro index,pager 'source /home/deadguy/.config/neomutt/accounts/6-dgy@fuckup.club.muttrc!;' "switch to dgy@fuckup.club" # mw-autogenerated macro index,pager 'source ~/.config/neomutt/accounts/1-alex.muttrc!;' "switch to vidaar@gmail.com" macro index,pager 'source ~/.config/neomutt/accounts/2-alejo.muttrc!;' "switch to alejo.jardon@gmail.com" -macro index,pager 'source ~/.config/neomutt/accounts/3-git.muttrc!;' "switch to adeadgit@gmail.com" macro index,pager 'source ~/.config/neomutt/accounts/4-iamz@airmail.cc.muttrc!;' "switch to iamz@airmail.cc" -macro index,pager 'source /home/deadguy/.config/neomutt/accounts/6-dgy@fuckup.club.muttrc!;' "switch to dgy@fuckup.club" # mw-autogenerated +macro index,pager 'source ~/.config/neomutt/accounts/3-git.muttrc!;' "switch to adeadgit@gmail.com" macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" diff --git a/.config/neomutt/neomuttrc.d/powerline.neomuttrc b/.config/neomutt/neomuttrc.d/powerline.neomuttrc index e1494eb..fa3ec1f 100644 --- a/.config/neomutt/neomuttrc.d/powerline.neomuttrc +++ b/.config/neomutt/neomuttrc.d/powerline.neomuttrc @@ -8,14 +8,14 @@ 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 status_format = " %f %?r? %m ?%?n? %n ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? \n \n" set vfolder_format = " %N %?n?%3n& ? %8m  · %f" set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M" # no addressed to me, to me, group, cc, sent by me, mailing list set to_chars="" # unchanged mailbox, changed, read only, attach mode -set status_chars = " " +set status_chars = " " ifdef crypt_chars set crypt_chars = " " set flag_chars = " " @@ -38,7 +38,7 @@ color status color12 default '(\s)([a-zA-Z0-9])' color status color12 default '( )' color status color12 default '(\S)' color status color0 default '(|)' -color status green default '' +color status green default '' color status white default '' color status yellow default '' color status red default '' diff --git a/.config/nvim/plugin/autocmds.vim b/.config/nvim/plugin/autocmds.vim index 8bd87bb..09330e5 100644 --- a/.config/nvim/plugin/autocmds.vim +++ b/.config/nvim/plugin/autocmds.vim @@ -2,6 +2,7 @@ scriptencoding utf-8 if !exists('autocommands_loaded') && has('autocmd') let autocommands_loaded = 1 + let ftToIgnore = ['markdown', 'html'] aug OnInsert au BufWinEnter,FocusGained,InsertLeave,WinEnter * call dead#functions#Relativize(1) @@ -25,7 +26,7 @@ if !exists('autocommands_loaded') && has('autocmd') aug END aug OnSave - au BufWritePre * :%s/\s\+$//e + au BufWritePre * if index(ftToIgnore, &ft) < 0 | :%s/\s\+$//e au BufWritePost *xresources !xrdb % au BufWritePost *sxhkdrc !pkill -USR1 sxhkd au BufWritePost *.tex !pdflatex % diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index e58b7f9..5482dfb 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -46,10 +46,10 @@ super + space rofi -show drun -theme dprompt2 super + {b,q,s,n,p,t,r,d} - {$BROWSER,powermenu,rofi -show window,escribir,pom,tv,ref,leer} + {$BROWSER,powermenu,rofi -show window,escribir,postear,tv,ref,leer} -super + ctrl + d - deci +super + ctrl + {d,p} + {deci,pom} super + {_,shift} + g {grabar,corte} diff --git a/.config/zsh/conf/00_prompt.zsh b/.config/zsh/conf/00_prompt.zsh index 1f3e9a5..645a19b 100644 --- a/.config/zsh/conf/00_prompt.zsh +++ b/.config/zsh/conf/00_prompt.zsh @@ -19,20 +19,15 @@ function () { export SPROMPT="zsh: correct %F{red}'%R'%f to %F{green}'%r'%f [%B%Uy%u%bes, %B%Un%u%bo, %B%Ue%u%bdit, %B%Ua%u%bbort]? " function zle-keymap-select { - if [[ ${KEYMAP} == vicmd ]] || - [[ $1 = 'block' ]]; then - echo -ne '\e[2 q' - elif [[ ${KEYMAP} == main ]] || - [[ ${KEYMAP} == viins ]] || - [[ ${KEYMAP} = '' ]] || - [[ $1 = 'beam' ]]; then - echo -ne '\e[6 q' - fi + case $KEYMAP in + vicmd) echo -ne '\e[2 q';; + viins|main) echo -ne '\e[6 q';; + esac } zle -N zle-keymap-select -zle-line-init() { - echo -ne "\e[6 q" + +_fix_cursor() { + echo -ne '\e[6 q' } -zle -N zle-line-init -echo -ne '\e[5 q' -preexec() { echo -ne '\e[6 q' ;} + +precmd_functions+=(_fix_cursor) diff --git a/.config/zsh/conf/03_aliases.zsh b/.config/zsh/conf/03_aliases.zsh index 2ddce76..1934429 100644 --- a/.config/zsh/conf/03_aliases.zsh +++ b/.config/zsh/conf/03_aliases.zsh @@ -11,11 +11,10 @@ alias \ pm='pulsemixer' \ nb='newsboat -q' \ py='python ' \ - gw='glow -p -w 80' \ ttx='txtnish timeline' \ vdf='nvim -d' \ irc='catgirl' \ - play='ncmpcpp' \ + play='mpd && ncmpcpp' \ pyserv='python -m http.server' # XBPS @@ -76,7 +75,7 @@ alias \ # Colores para pintar este twist alias \ diff='diff --color=auto' \ - ls='ls -AFpt --color=always --group-directories-first' \ + ls='ls -AFt --color=always --group-directories-first' \ grep='grep --color=tty -d skip' \ dmesg='dmesg --color=always' \ vsv='sudo vsv -c yes' \ @@ -95,7 +94,6 @@ alias \ dfc='dfc -dmT' \ wget="wget --no-hsts" slrn='slrn -i ~/.config/slrn/rc -f ~/.config/slrn/jnewsrc.club --create' - # strim='mpv --jack-port="OBS Jack Input"' \ # Comandos alias \ @@ -107,5 +105,6 @@ alias \ pwn='chmod +x' \ atl='atool --each --extract' \ rat='tar -xvJf' \ + mpk='mpd --kill' \ um='udevil mount' \ uu='udevil umount' diff --git a/.local/bin/escribir b/.local/bin/escribir index e7cb3ad..9cf16a7 100755 --- a/.local/bin/escribir +++ b/.local/bin/escribir @@ -30,22 +30,23 @@ notas() { articulo() { menuArticulo=$(printf "Fuckup\\nMuert.o\\nDotfiles\\nTextArt" | listar -p " ") case $menuArticulo in - "Fuckup") cd "$ARTDIR/fuckup.club/blog" || exit ;; + "Fuckup") cd "$ARTDIR/fuckup/blog" || exit ;; "Dotfiles") cd "$ARTDIR/club/the-dot-files" || exit ;; "TextArt") cd "$ARTDIR/town/textarrrgh" || exit ;; "Muert.o") cd "$ARTDIR/texto-plano/muert.o" || exit ;; esac + [ -z "$menuArticulo" ] && exit 0 nombre="$(listar -theme dprompt -p "Titulo: ")" 2>/dev/null [ -z "$nombre" ] && exit 0 nombreForm="$(echo "$nombre" | tr ' ' '-')" if [ "$PWD" = "$ARTDIR/texto-plano/muert.o" ]; then hugo new articulos/"$nombreForm".md - sleep 5 - abrir content/articulos/"$nombre".md + sleep 3 + abrir "$PWD/content/articulos/$nombreForm.md" else hugo new posts/"$nombreForm".md - sleep 5 - abrir content/posts/"$nombre".md + sleep 3 + abrir "$PWD/content/posts/$nombreForm.md" fi } diff --git a/.local/bin/postear b/.local/bin/postear index 464ad21..16a955d 100755 --- a/.local/bin/postear +++ b/.local/bin/postear @@ -1,5 +1,34 @@ #!/bin/sh -cd "$HOME/doc/paginas/muert.o" || exit -git add content/articulos/* && git commit -m "nuevo post" -git push +MAINDIR="$HOME/doc/paginas/tilde" + +muerto() { + cd "$MAINDIR/texto-plano/muert.o" || exit + hugo + git add public/* && git commit -m "nuevo post" +} + +dotfiles() { + cd "$MAINDIR/club/the-dot-files" || exit + git add . && git commit -m "nuevo post" +} + +fuckup() { + cd "$MAINDIR/fuckup/blog" || exit + git add . && git commit -m "nuevo post" +} + +textart() { + cd "$MAINDIR/town/textarrrgh" || exit + git add . && git commit -m "nuevo post" +} + +listar() { rofi -dmenu "$@"; } + +MENU="$(printf "Fuckup\\nMuerto\\nDotfiles\\nTextArt" | listar -p " ")" +case $MENU in +'Fuckup') fuckup ;; +'Muerto') muerto ;; +'Dotfiles') dotfiles ;; +'TextArt') textart ;; +esac diff --git a/doc/xbpaketes b/doc/xbpaketes index ee45335..2b82600 100644 --- a/doc/xbpaketes +++ b/doc/xbpaketes @@ -32,14 +32,12 @@ file-roller firefox fluidsynth freepats -fuse-sshfs fzf gcc giada git git-extras git-libsecret -glow gnome-ssh-askpass gnupg2 go @@ -68,7 +66,6 @@ librsvg librsvg-utils libva-intel-driver lm_sensors -lynx maim mdadm mlocate @@ -111,6 +108,7 @@ qjackctl ripgrep rkhunter rofi +rpi-imager sc3-plugins setxkbmap shellcheck @@ -123,13 +121,13 @@ sxhkd sxiv texlive-bin thermald -tidy5 timidity tmux toilet transmission tremc udevil +udisks2 unclutter-xfixes unrar unzip