dotfiles

Luke's GNU/Linux dotfiles for i3, vim, ranger, bash, mpd, etc.
git clone git@git.lukesmith.xyz:dotfiles
Log | Files | Refs | README | LICENSE

commit 458bb4b59b0cea24ff5a03752ea88a6213872262
parent 43dd07dbe7df8bbf4d8cb3756177a4e2f0d5d0d5
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Mon,  3 Dec 2018 00:59:35 -0500

wget replaced by curl

Diffstat:
M.scripts/tools/dmenuhandler | 9+++++----
M.scripts/tools/linkhandler | 8+++++---
2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/.scripts/tools/dmenuhandler b/.scripts/tools/dmenuhandler @@ -2,12 +2,13 @@ # Feed this script a link and it will give dmenu # some choice programs to use to open it. -x=$(printf "mpv\\nmpv (loop)\\nwget\\nfeh\\nbrowser\\nw3m\\nmpv (float)" | dmenu -i -p "Open link with what program?") -case "$x" in +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 mpv -quiet "$1" >/dev/null 2>&1 & ;; "mpv (loop)") setsid mpv -quiet --loop "$1" >/dev/null 2>&1 & ;; - wget) wget "$1" >/dev/null 2>&1 ;; - browser) setsid "$TRUEBROWSER" "$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 "$TRUEBROWSER" "$1" >/dev/null 2>&1 & ;; feh) setsid feh "$1" >/dev/null 2>&1 & ;; w3m) w3m "$1" >/dev/null 2>&1 ;; "mpv (float)") setsid mpv --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 & ;; diff --git a/.scripts/tools/linkhandler b/.scripts/tools/linkhandler @@ -13,13 +13,15 @@ scihub="http://sci-hub.tw/" [ -z "$1" ] && { "$TRUEBROWSER"; exit; } case "$1" in - *mkv|*webm|*mp4|*gif|*youtube.com*|*hooktube.com*) + *mkv|*webm|*mp4|*gif|*youtube.com*|*youtu.be*|*hooktube.com*|*bitchute.com*) setsid mpv -quiet "$1" >/dev/null 2>&1 & ;; *png|*jpg|*jpe|*jpeg) setsid feh "$1" >/dev/null 2>&1 & ;; *mp3|*flac|*opus|*mp3?source) - setsid tsp wget "$1" >/dev/null 2>&1 & ;; + setsid tsp curl -LO "$1" >/dev/null 2>&1 & ;; *springer.com*) setsid curl -sO "$(curl -s "$scihub$*" | grep -Po "(?<=location.href=').+.pdf")" >/dev/null 2>&1 & ;; - *) setsid "$TRUEBROWSER" "$1" >/dev/null 2>&1 & ;; + *) + if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR $1" + else setsid "$TRUEBROWSER" "$1" >/dev/null 2>&1 & fi ;; esac