major springcleaning
This commit is contained in:
@ -11,14 +11,14 @@ makepathabsolute(){
|
||||
echo "$dl_location"
|
||||
}
|
||||
|
||||
choices="$(printf 'mpv\\ncopy url\\nqueue download\\nrifle file\\nqueue youtube-dl\\nbrowser\\nrip media\\ncast')"
|
||||
choices="$(printf 'mpv\ncopy url\nqueue download\nrifle file\nqueue youtube-dl\nbrowser\nrip media\ncast')"
|
||||
if echo "$1" | grep -q "4chan"; then
|
||||
choices="$(printf '%s\\nwatch thread' "$choices")"
|
||||
choices="$(printf '%s\nwatch thread' "$choices")"
|
||||
fi
|
||||
choice="$(echo "$choices" | dmenu -i -p "Open link with what program?")"
|
||||
case "$choice" in
|
||||
"copy url") echo "$1" | xclip -selection clipboard ;;
|
||||
mpv) setsid mpv --quiet --ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]' "$1" & ;;
|
||||
mpv) setsid mpv --quiet --ytdl-format='bestvideo[height<=1080]+bestaudio/best[height<=1080]' --force-window=yes "$1" & ;;
|
||||
"mpv (loop)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet --loop "$1" >/dev/null 2>&1 & ;;
|
||||
"queue download") name="$( dmenuinput 'Name for file:' )"
|
||||
[ -z "$name" ] && tsp curl -C - -LO "$1" >/dev/null 2>&1
|
||||
@ -32,7 +32,7 @@ case "$choice" in
|
||||
#"mpv (float)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) --geometry=+0-0 --autofit=30% --title="mpvfloat" "$1" >/dev/null 2>&1 & ;;
|
||||
"rifle file") curl -L "$1" -o "/tmp/riflefile"
|
||||
rifle /tmp/riflefile;;
|
||||
"watch thread") dest="$(dmenuinput 'name of folder:')"
|
||||
"watch thread") dest="$(find $HOME -maxdepth 5 -type d -not -path "$HOME/.*" | dmenu -i -p 'name of folder:')"
|
||||
[ -z "$dest" ] && exit
|
||||
echo "dmenuhandler:$dest"
|
||||
mkdir -p "$(makepathabsolute "$dest")"
|
||||
|
Reference in New Issue
Block a user