Dotfiles for different machines on different branches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
903 B

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