Browse Source

diasble debug for remoteoffice, added test editor and file manager to sanemime

master
haemka 3 years ago
parent
commit
618c755a25
2 changed files with 21 additions and 3 deletions
  1. +0
    -2
      remoteoffice.sh
  2. +21
    -1
      sanemime.sh

+ 0
- 2
remoteoffice.sh View File

@@ -1,7 +1,5 @@
#!/bin/sh

set -x

# VPN
NMCONN="49088a1e-18c2-48aa-a664-f212eb83a727"
# RDP


+ 21
- 1
sanemime.sh View File

@@ -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})


Loading…
Cancel
Save