summaryrefslogtreecommitdiff
path: root/misc/mime
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2021-12-23 22:20:14 -0600
committerTimmy Keller <tjk@tjkeller.xyz>2021-12-23 22:20:14 -0600
commitf4b77c42ca78c5265c4754caeef5289e3841f5e9 (patch)
treebad69cda55721e2230d909b16d438f4472105db1 /misc/mime
parent63505f644d8f2bf8c9d4ca493048081f83532cf8 (diff)
downloadscripts-f4b77c42ca78c5265c4754caeef5289e3841f5e9.tar.xz
scripts-f4b77c42ca78c5265c4754caeef5289e3841f5e9.zip
some youtube dl script and dmenu runapplication and test timmywm and modified other scripts idjlol
Diffstat (limited to 'misc/mime')
-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