diff options
Diffstat (limited to 'xdg-add')
-rwxr-xr-x | xdg-add | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#!/bin/bash +# +# A xdg-mime shortcut. +# + +# Parameters +APP="$1" +FILETYPE="$2" + +# Check if second param is a file +if [ -e "$FILETYPE" ]; then + FILETYPE="`xdg-mime query filetype $FILETYPE`" +fi + +# Make association +xdg-mime default ${APP}.desktop $FILETYPE |