Commit 27840b5
xxwhirlpool
·
2025-10-22 18:48:02 -0400 EDT
parent ab480b4
today, md2html, bashrc-pc
3 files changed,
+78,
-3
+7,
-3
| ... | ... | @@ -129,7 +129,8 @@ alias neofetch="hyfetch" | |
| 129 | 129 | alias fastfetch="hyfetch" | |
| 130 | 130 | alias bat="batcat" | |
| 131 | 131 | alias cat="bat --paging=never" | |
| 132 | - | alias iconsubfolalias iconsubfol="find . -mindepth 2 -type f -print -exec mv {} . \;" | |
| 132 | + | alias iconsubfol="find . -mindepth 2 -type f -print -exec mv {} . \;" | |
| 133 | + | alias rced="micro ~/.bashrc && source ~/.bashrc" | |
| 133 | 134 | ||
| 134 | 135 | # lazy ass way for me to get my idol mp3s from youtube | |
| 135 | 136 | # usage: ytmp3 url |
| ... | ... | @@ -159,7 +160,8 @@ alias gmine="cd /home/kat/Documents/Git/-mine" | |
| 159 | 160 | alias fujo="kitty +kitten ssh fujo" | |
| 160 | 161 | alias fujohost="kitty +kitten ssh fujohost" | |
| 161 | 162 | alias fujobuild="kitty +kitten ssh fujobuild" | |
| 162 | - | alias steff="kitty +kitten ssh steff" | |
| 163 | + | alias goldstar="kitty +kitten ssh goldstar" | |
| 164 | + | alias ncc="kitty +kitten ssh ncc1701" | |
| 163 | 165 | ||
| 164 | 166 | ###################################### | |
| 165 | 167 | # variables |
| ... | ... | @@ -189,6 +191,8 @@ export NVM_DIR="$HOME/.config/nvm" | |
| 189 | 191 | ||
| 190 | 192 | . "$HOME/.cargo/env" | |
| 191 | 193 | ||
| 194 | + | . "/home/kat/.deno/env" | |
| 195 | + | ||
| 192 | 196 | ###################################### | |
| 193 | 197 | # functions | |
| 194 | 198 | ###################################### |
| ... | ... | @@ -243,7 +247,7 @@ playart() { | |
| 243 | 247 | # after long commands | |
| 244 | 248 | notif() { | |
| 245 | 249 | notify-send "done!" | |
| 246 | - | aplay -q /usr/share/sounds/sound-icons/start | |
| 250 | + | paplay /usr/share/sounds/sound-icons/start | |
| 247 | 251 | spd-say -t female3 -r +25 "done!" | |
| 248 | 252 | } | |
| 249 | 253 |
+54,
-0
| ... | ... | @@ -0,0 +1,54 @@ | |
| 1 | + | #!/usr/bin/env bash | |
| 2 | + | # | |
| 3 | + | # convert markdown to HTML | |
| 4 | + | # can read from STDIN or file | |
| 5 | + | # | |
| 6 | + | # this is a *very* opinionated script, using: | |
| 7 | + | # gum, bat, perl, and xclip | |
| 8 | + | # pandoc is mandatory!!! | |
| 9 | + | # edit to suit your system | |
| 10 | + | ||
| 11 | + | # functions | |
| 12 | + | read() { | |
| 13 | + | # declare some vars | |
| 14 | + | MDFILE="/tmp/$(today time && openssl rand -hex 5).md" | |
| 15 | + | HTMLFILE="${MDFILE%.*}.html" | |
| 16 | + | HTMLFILE_FINAL="${HTMLFILE%.*}_final.html" | |
| 17 | + | # prompt user to paste markdown formatted text, then write it to a temp file | |
| 18 | + | gum write > "$MDFILE" | |
| 19 | + | # the conversion! | |
| 20 | + | pandoc --no-highlight --wrap=none "$MDFILE" -o "$HTMLFILE" | |
| 21 | + | # swap unicode/HTML entities to their actual characters | |
| 22 | + | perl -C -MHTML::Entities -pe 'decode_entities($_);' < "$HTMLFILE" > "$HTMLFILE_FINAL" | |
| 23 | + | # show final file | |
| 24 | + | batcat --paging=never "$HTMLFILE_FINAL" | |
| 25 | + | # copy file to clipboard too | |
| 26 | + | xclip -sel clip "$HTMLFILE_FINAL" | |
| 27 | + | } | |
| 28 | + | ||
| 29 | + | fromfile() { | |
| 30 | + | # declare some vars | |
| 31 | + | MDFILE=$(gum filter) | |
| 32 | + | HTMLFILE="${MDFILE%.*}.html" | |
| 33 | + | HTMLFILE_FINAL="${HTMLFILE%.*}_final.html" | |
| 34 | + | # the conversion! | |
| 35 | + | pandoc --no-highlight --wrap=none "$MDFILE" -o "$HTMLFILE" | |
| 36 | + | # swap unicode/HTML entities to their actual characters | |
| 37 | + | perl -C -MHTML::Entities -pe 'decode_entities($_);' < "$HTMLFILE" > "$HTMLFILE_FINAL" | |
| 38 | + | # show final file | |
| 39 | + | batcat --paging=never "$HTMLFILE_FINAL" | |
| 40 | + | # copy file to clipboard too | |
| 41 | + | xclip -sel clip "$HTMLFILE_FINAL" | |
| 42 | + | } | |
| 43 | + | ||
| 44 | + | # execute it | |
| 45 | + | choice() { | |
| 46 | + | choose=$(gum choose "paste" "file") | |
| 47 | + | case "$choose" in | |
| 48 | + | *paste) read ;; | |
| 49 | + | *file) fromfile ;; | |
| 50 | + | *) exit ;; | |
| 51 | + | esac | |
| 52 | + | } | |
| 53 | + | ||
| 54 | + | choice |
+17,
-0
| ... | ... | @@ -0,0 +1,17 @@ | |
| 1 | + | #!/usr/bin/env bash | |
| 2 | + | # | |
| 3 | + | # current date in ISO format | |
| 4 | + | ||
| 5 | + | # if you also want time then supply `time` arg: | |
| 6 | + | # today time | |
| 7 | + | today() { | |
| 8 | + | if [ $# -eq 0 ]; then | |
| 9 | + | echo -e "$(date '+%Y-%m-%d')" | |
| 10 | + | fi | |
| 11 | + | ||
| 12 | + | if [ "$1" == "time" ]; then | |
| 13 | + | echo -e "$(date '+%Y-%m-%d_%I:%M%p')" | |
| 14 | + | fi | |
| 15 | + | } | |
| 16 | + | ||
| 17 | + | today |