my xfce4 dotfiles
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
345 B

3 years ago
  1. # Only compatible with MacOS
  2. [[ "$OSTYPE" == darwin* ]] || return
  3. droplr() {
  4. if [[ $# -eq 0 ]]; then
  5. echo You need to specify a parameter. >&2
  6. return 1
  7. fi
  8. if [[ "$1" =~ ^https?:// ]]; then
  9. osascript -e 'tell app "Droplr" to shorten "'"$1"'"'
  10. else
  11. open -ga /Applications/Droplr.app "$1"
  12. fi
  13. }