From f4b77c42ca78c5265c4754caeef5289e3841f5e9 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Thu, 23 Dec 2021 22:20:14 -0600 Subject: some youtube dl script and dmenu runapplication and test timmywm and modified other scripts idjlol --- misc/mime | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'misc') 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 -- cgit v1.2.3