From 611645af973a4757ad35ca8be34ff33693573e27 Mon Sep 17 00:00:00 2001 From: Epacnoss <49815482+Epacnoss@users.noreply.github.com> Date: Sun, 8 Nov 2020 12:57:37 +0000 Subject: [PATCH 1/2] Add support for Org-Mode files. (#837) --- .local/bin/compiler | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/compiler b/.local/bin/compiler index c56a25a..d50c393 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -3,7 +3,7 @@ # This script will compile or run another finishing operation on a document. I # have this script run via vim. # -# Compiles .tex. groff (.mom, .ms), .rmd, .md. Opens .sent files as sent +# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent # presentations. Runs scripts based on extention or shebang # # Note that .tex files which you wish to compile with XeLaTeX should have the @@ -49,5 +49,6 @@ case "$ext" in scad) openscad -o "$base".stl "$file" ;; sent) setsid -f sent "$file" 2>/dev/null ;; tex) textype "$file" ;; + org) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; *) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; esac From 7f139718e9d729f073dcb8d63ffe957229576c2c Mon Sep 17 00:00:00 2001 From: Hekuran <62762955+narukeh@users.noreply.github.com> Date: Mon, 9 Nov 2020 00:49:34 +0000 Subject: [PATCH 2/2] UAE - update autisticly efficient (#838) --- .local/bin/dmenuhandler | 25 +++++++++++++++---------- .local/bin/linkhandler | 9 +++++---- .local/bin/qndl | 2 +- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler index 5bdd131..e5de8ef 100755 --- a/.local/bin/dmenuhandler +++ b/.local/bin/dmenuhandler @@ -2,15 +2,20 @@ # Feed this script a link and it will give dmenu # some choice programs to use to open it. +feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}" -case "$(printf "copy url\\nmpv\\nmpv (loop)\\nqueue download\\n\\nqueue youtube-dl\\nfeh\\nbrowser\\nw3m\\nmpv (float)" | dmenu -i -p "Open link with what program?")" in - "copy url") echo "$1" | xclip -selection clipboard ;; - mpv) setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;; - "mpv (loop)") setsid -f mpv -quiet --loop "$1" >/dev/null 2>&1 ;; - "queue download") tsp curl -LO "$1" >/dev/null 2>&1 ;; - "queue youtube-dl") tsp youtube-dl --write-metadata -ic "$1" >/dev/null 2>&1 ;; - browser) setsid -f "$BROWSER" "$1" >/dev/null 2>&1 ;; - feh) setsid -f feh "$1" >/dev/null 2>&1 ;; - w3m) w3m "$1" >/dev/null 2>&1 ;; - "mpv (float)") setsid -f mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 ;; +case "$(printf "Copy URL\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dl\\nqueue yt-dl audio" | dmenu -i -p "Open it with?")" in + "copy url") echo "$feed" | xclip -selection clipboard ;; + mpv) setsid -f mpv -quiet "$feed" >/dev/null 2>&1 ;; + "mpv loop") setsid -f mpv -quiet --loop "$feed" >/dev/null 2>&1 ;; + "mpv float") setsid -f "$TERMINAL" -e mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$feed" >/dev/null 2>&1 ;; + "queue yt-dl") qndl "$feed" >/dev/null 2>&1 ;; + "queue yt-dl audio") qndl "$feed" 'youtube-dl --add-metadata -icx -f bestaudio/best' >/dev/null 2>&1 ;; + "queue download") qndl "$feed" 'curl -LO' >/dev/null 2>&1 ;; + PDF) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; + sxiv) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; + vim) curl -sL "$feed" > "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" && setsid -f "$TERMINAL" -e "$EDITOR" "/tmp/$(echo "$feed" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 ;; + setbg) curl -L "$feed" > $XDG_CACHE_HOME/pic ; xwallpaper --zoom $XDG_CACHE_HOME/pic >/dev/null 2>&1 ;; + browser) setsid -f "$BROWSER" "$feed" >/dev/null 2>&1 ;; + lynx) lynx "$feed" >/dev/null 2>&1 ;; esac diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler index ee5d170..04934e5 100755 --- a/.local/bin/linkhandler +++ b/.local/bin/linkhandler @@ -13,10 +13,11 @@ case "$1" in *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*) setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;; *png|*jpg|*jpe|*jpeg|*gif) - curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")" >/dev/null 2>&1 & ;; + curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; + *pdf|*cbz|*cbr) + curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;; *mp3|*flac|*opus|*mp3?source*) - setsid -f tsp curl -LO "$1" >/dev/null 2>&1 ;; + qndl "$1" 'curl -LO' >/dev/null 2>&1 ;; *) - if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR" "$1" - else setsid -f "$BROWSER" "$1" >/dev/null 2>&1; fi ;; + [ -f "$1" ] && setsid -f "$TERMINAL" -e "$EDITOR" "$1" >/dev/null 2>&1 || setsid -f "$BROWSER" "$1" >/dev/null 2>&1 esac diff --git a/.local/bin/qndl b/.local/bin/qndl index f5bd14f..f6fbe87 100755 --- a/.local/bin/qndl +++ b/.local/bin/qndl @@ -5,7 +5,7 @@ base="$(basename "$1")" notify-send "⏳ Queuing $base..." cmd="$2" -[ -z "$cmd" ] && cmd="youtube-dl --add-metadata" +[ -z "$cmd" ] && cmd="youtube-dl --add-metadata -ic" idnum="$(tsp $cmd "$1")" realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")" tsp -D "$idnum" mv "$base" "$realname"