diff --git a/qutebrowser/scripts/recently-downloaded b/qutebrowser/scripts/recently-downloaded index 19dd925..5e87be9 100755 --- a/qutebrowser/scripts/recently-downloaded +++ b/qutebrowser/scripts/recently-downloaded @@ -100,19 +100,14 @@ if [ -z "$line" ]; then exit 0 fi -msg info "file is $line" path="$DOWNLOAD_DIR/$line" -filetype=$(xdg-mime query filetype "$path") -application=$(xdg-mime query default "$filetype") -if [ -z "$application" ]; then - die "Do not know how to open »$line« of type $filetype" -fi +msg info "Opening »$line«." -msg info "Opening »$line« (of type $filetype) with ${application%.desktop}" - -if type open >/dev/null 2>&1; then +if command -v open >/dev/null 2>&1; then open "$path" & +elif command -v mimeo >/dev/null 2>&1; then + mimeo "$path" & else xdg-open "$path" & fi