|
|
@@ -12,11 +12,13 @@ cp ${HOME}/.config/mimeapps.list ${HOME}/.config/mimeapps.list.bak |
|
|
|
|
|
|
|
BROWSER=/usr/share/applications/firefox.desktop |
|
|
|
EMAIL=${HOME}/.local/share/applications/neomutt.desktop |
|
|
|
#IMAGE_VIEWER=/usr/share/applications/feh.desktop |
|
|
|
IMAGE_VIEWER=/usr/share/applications/sxiv.desktop |
|
|
|
VIDEO_VIEWER=/usr/share/applications/mpv.desktop |
|
|
|
PDF_VIEWER=/usr/share/applications/org.pwmt.zathura-pdf-mupdf.desktop |
|
|
|
|
|
|
|
FILE_MANAGER=/usr/share/applications/thunar.desktop |
|
|
|
TEXT_EDITOR=/usr/share/applications/leafpad.desktop |
|
|
|
|
|
|
|
MSTEAMS=${HOME}/.local/share/applications/teams.desktop |
|
|
|
TS3=${HOME}/.local/share/applications/teamspeak.desktop |
|
|
|
ZOOM=${HOME}/.local/share/applications/zoom.desktop |
|
|
@@ -37,6 +39,24 @@ for type in ${types[@]}; do |
|
|
|
xdg-mime default $(basename ${EMAIL}) ${type} |
|
|
|
done |
|
|
|
|
|
|
|
# Set default file manager |
|
|
|
FILE_MANAGER_NAME=$(awk -F= '/^Name=/ {print $2;exit;}' ${FILE_MANAGER}) |
|
|
|
IFS=';' read -ra types <<< $(awk -F= '/MimeType/ {print $2}' ${FILE_MANAGER}) |
|
|
|
for type in ${types[@]}; do |
|
|
|
echo "Setting ${type} to ${FILE_MANAGER_NAME}" |
|
|
|
xdg-mime default $(basename ${FILE_MANAGER}) ${type} |
|
|
|
done |
|
|
|
|
|
|
|
# Set default text editor |
|
|
|
TEXT_EDITOR_NAME=$(awk -F= '/^Name=/ {print $2;exit;}' ${TEXT_EDITOR}) |
|
|
|
IFS=';' read -ra types <<< $(awk -F= '/MimeType/ {print $2}' ${TEXT_EDITOR}) |
|
|
|
for type in ${types[@]}; do |
|
|
|
if [[ ${type} =~ ^text.*$ ]]; then |
|
|
|
echo "Setting ${type} to ${TEXT_EDITOR_NAME}" |
|
|
|
xdg-mime default $(basename ${TEXT_EDITOR}) ${type} |
|
|
|
fi |
|
|
|
done |
|
|
|
|
|
|
|
# Set default image viewer |
|
|
|
IMAGE_VIEWER_NAME=$(awk -F= '/^Name=/ {print $2;exit;}' ${IMAGE_VIEWER}) |
|
|
|
IFS=';' read -ra types <<< $(awk -F= '/MimeType/ {print $2}' ${IMAGE_VIEWER}) |
|
|
|