diff --git a/contacts-importer b/contacts-importer index 8ca867f..cff65f0 100755 --- a/contacts-importer +++ b/contacts-importer @@ -6,7 +6,11 @@ #Selecting a file -FILE=`yad --title "Import Contacts" --text="Select a VCF file to import" --file=` +if [ -n "$1" ]; then + FILE="$1" +else + FILE=`yad --title "Import Contacts" --text="Select a VCF file to import" --file=` +fi if [ "$FILE" == "" ]; then `yad --title "Import Contacts" --text="You did not selected any file"` exit 1 diff --git a/contacts-importer.desktop b/contacts-importer.desktop index cc14a98..d9b8398 100644 --- a/contacts-importer.desktop +++ b/contacts-importer.desktop @@ -2,5 +2,6 @@ Name=Contacts Importer Type=Application Icon=preferences-desktop-personal -Exec=/usr/bin/contacts-importer +Exec=/usr/bin/contacts-importer %U Categories=Utility; +MimeType=text/x-vcard;