diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-05-09 10:59:29 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-05-09 10:59:29 -0300 |
commit | fec935a411d77e40957e6bf08ea62d001413d12c (patch) | |
tree | 25777195098a9314fb31f6e55d0ba0df4d1ddd5e /xdg-add | |
parent | f8783cfcfe7ebdb8e328e37322cf68d908f7e8f9 (diff) | |
download | scripts-fec935a411d77e40957e6bf08ea62d001413d12c.tar.gz scripts-fec935a411d77e40957e6bf08ea62d001413d12c.tar.bz2 |
Adds xdg-add
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 |