sh: Add default open script
Simple wrapper for xdg-open functionality. Simply refers to xdg-open except if there exists mimeo on the system which it will refer to instead. So, a simple preference modificator for mimeo over xdg-open since that is my preference too. Also gave it a short name so I can do open whenever I want and don't have to tax my left hand with tying xdg.
This commit is contained in:
parent
dfaed8c9dd
commit
4cc03a611a
8 changed files with 34 additions and 28 deletions
|
|
@ -93,9 +93,9 @@ if [ "${#entries[@]}" -eq 0 ]; then
|
|||
die "Download directory »${DOWNLOAD_DIR}« empty"
|
||||
fi
|
||||
|
||||
line=$(printf '%s\n' "${entries[@]}" \
|
||||
| crop-first-column \
|
||||
| $ROFI_CMD "${ROFI_ARGS[@]}") || true
|
||||
line=$(printf '%s\n' "${entries[@]}" |
|
||||
crop-first-column |
|
||||
$ROFI_CMD "${ROFI_ARGS[@]}") || true
|
||||
if [ -z "$line" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
|
@ -111,4 +111,8 @@ fi
|
|||
|
||||
msg info "Opening »$line« (of type $filetype) with ${application%.desktop}"
|
||||
|
||||
xdg-open "$path" &
|
||||
if type open >/dev/null 2>&1; then
|
||||
open "$path" &
|
||||
else
|
||||
xdg-open "$path" &
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue