From fecbfe74f851af1b92f89a53cb1398e58221a756 Mon Sep 17 00:00:00 2001 From: deadguy Date: Tue, 29 Dec 2020 12:08:04 -0300 Subject: [PATCH] Mejorar scripts de blogs Optimize el script para subir los posts a los blogs. o al menos creo que lo optimize, ya veremos que pasa. Tambien corregi 2 cositas del script de escribir. --- .config/dunst/dunstrc | 4 ++-- .local/bin/escribir | 6 +++--- .local/bin/postear | 30 ++++++++---------------------- .zshenv | 1 + 4 files changed, 14 insertions(+), 27 deletions(-) diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 70d7334..a96c927 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -59,10 +59,10 @@ dmenu = /usr/bin/dmenu -p dunst: browser = /usr/bin/firefox -new-tab icon_position = right # Align icons left/right/off - max_icon_size = 0 + max_icon_size = 52 # Paths to default icons. - icon_path = /home/deadguy/.local/share/icons/Marwaita-Light/32x32/apps /home/deadguy/.local/share/icons/Marwaita-Light/32x32/devices /home/deadguy/.local/share/icons/Marwaita-Light/32x32/status + icon_path = /home/deadguy/.local/share/icons/Haiku/scalable/actions:/home/deadguy/.local/share/icons/Haiku/scalable/animations:/home/deadguy/.local/share/icons/Haiku/scalable/apps:/home/deadguy/.local/share/icons/Haiku/scalable/categories:/home/deadguy/.local/share/icons/Haiku/scalable/devices:/home/deadguy/.local/share/icons/Haiku/scalable/emblems:/home/deadguy/.local/share/icons/Haiku/scalable/emotes:/home/deadguy/.local/share/icons/Haiku/scalable/mimetypes:/home/deadguy/.local/share/icons/Haiku/scalable/places:/home/deadguy/.local/share/icons/Haiku/scalable/status:/home/deadguy/.local/share/icons/Haiku/scalable/stock # Always run rule-defined scripts, even if the notification is suppressed always_run_script = true diff --git a/.local/bin/escribir b/.local/bin/escribir index 9cf16a7..eebcb4d 100755 --- a/.local/bin/escribir +++ b/.local/bin/escribir @@ -19,7 +19,7 @@ notas() { menuNota=$(printf "Nueva\\nArchivo" | listar -p " ") case $menuNota in "Nueva") - nombre="$(listar -theme dprompt -p "Titulo: ")" 2>/dev/null + nombre="$(listar -theme dprompt -p "Título: ")" 2>/dev/null [ -z "$nombre" ] && exit 0 abrir "$nombre".md ;; @@ -41,11 +41,11 @@ articulo() { nombreForm="$(echo "$nombre" | tr ' ' '-')" if [ "$PWD" = "$ARTDIR/texto-plano/muert.o" ]; then hugo new articulos/"$nombreForm".md - sleep 3 + sleep 1 abrir "$PWD/content/articulos/$nombreForm.md" else hugo new posts/"$nombreForm".md - sleep 3 + sleep 1 abrir "$PWD/content/posts/$nombreForm.md" fi } diff --git a/.local/bin/postear b/.local/bin/postear index 16a955d..4866ddc 100755 --- a/.local/bin/postear +++ b/.local/bin/postear @@ -2,24 +2,10 @@ 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 +subir() { + if [ "$PWD" = "$MAINDIR/texto-plano/muert.o" ] || [ "$PWD" = "$MAINDIR/town/textarrrgh" ]; then + hugo + fi git add . && git commit -m "nuevo post" } @@ -27,8 +13,8 @@ listar() { rofi -dmenu "$@"; } MENU="$(printf "Fuckup\\nMuerto\\nDotfiles\\nTextArt" | listar -p " ")" case $MENU in -'Fuckup') fuckup ;; -'Muerto') muerto ;; -'Dotfiles') dotfiles ;; -'TextArt') textart ;; +'Fuckup') cd "$MAINDIR/fuckup/blog" && subir || exit ;; +'Muerto') cd "$MAINDIR/texto-plano/muert.o" && subir || exit ;; +'Dotfiles') cd "$MAINDIR/club/the-dot-files" && subir || exit ;; +'TextArt') cd "$MAINDIR/town/textarrrgh" && subir || exit ;; esac diff --git a/.zshenv b/.zshenv index 6e89f21..9652228 100644 --- a/.zshenv +++ b/.zshenv @@ -50,6 +50,7 @@ export NNTPSERVER="news.tilde.club" _JAVA_OPTIONS="-Djava.util.prefs.userRoot=${XDG_DATA_HOME:-$HOME/.local/share}/java " _JAVA_OPTIONS+="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true " _JAVA_OPTIONS+="-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" +_JAVA_OPTIONS+='-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Djdk.gtk.version=3' export _JAVA_OPTIONS eval "$(sed 's/^[^#].*/export &/g;t;d' ${DIR:-$XDG_CONFIG_HOME}/user-dirs.dirs)"