summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/mime9
1 files changed, 7 insertions, 2 deletions
diff --git a/misc/mime b/misc/mime
index 376506b..7c6a649 100755
--- a/misc/mime
+++ b/misc/mime
@@ -65,6 +65,7 @@ echo
# Choose subtype
mtypefile="$cachedir/$mtype.csv"
[ -e "$mtypefile" ] && interactiveopt "all\n$(cut -d',' -f1 "$mtypefile" | tail -n +2)" "Choose $mtype subtype: " "" col
+mfiletypes=" $opt "
echo
# Choose program
@@ -73,8 +74,12 @@ program="$opt"
echo "$program"
echo
+#echo "$mfiletypes" | grep ' all ' && mfiletypes="$(cut -d',' -f1 "$cachedir/$mtype.csv" | tail -n +2)"
+
# Xdg-mime commands
-#echo "All $mtype Types\n$(cut -d',' -f1 "$cachedir/image.csv" | tail -n +2)"
#cut -d',' -f2 "$cachedir/image.csv"
-#[ -n "$mimetype" ] && xdg-mime default $application.desktop $mimetype
+for mfiletype in $(cut -d',' -f1 "$cachedir/$mtype.csv" | tail -n +2); do
+ echo "Changing default program for $mfiletype to $program"
+ xdg-mime default "$program.desktop" $mfiletype
+done