dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

dmenuhandler (911B)


      1 #!/usr/bin/env sh
      2 # Feed this script a link and it will give dmenu
      3 # some choice programs to use to open it.
      4 
      5 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
      6 	"copy url") echo "$1" | xclip -selection clipboard ;;
      7 	mpv) setsid mpv -quiet "$1" >/dev/null 2>&1 & ;;
      8 	"mpv (loop)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet --loop "$1" >/dev/null 2>&1 & ;;
      9 	"queue download") tsp curl -LO "$1" >/dev/null 2>&1 ;;
     10 	"queue youtube-dl") tsp youtube-dl --write-metadata -ic "$1" >/dev/null 2>&1 ;;
     11 	browser) setsid "$BROWSER" "$1" >/dev/null 2>&1 & ;;
     12 	feh) setsid feh "$1" >/dev/null 2>&1 & ;;
     13 	w3m) w3m "$1" >/dev/null 2>&1 ;;
     14 	"mpv (float)") setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) --geometry=+0-0 --autofit=30%  --title="mpvfloat" "$1" >/dev/null 2>&1 & ;;
     15 esac