Skip to content

Commit

Permalink
Boxy SVG: fix mimeapps association: semicolon made it ignore svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Botspot committed Feb 22, 2024
1 parent 6212d0b commit 150cc41
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/Boxy SVG/install
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ cat << "EOF" | sudo tee /usr/local/bin/boxy-svg >/dev/null
EOF
sudo chmod +x /usr/local/bin/boxy-svg

if [ -z "$(cat ~/.config/mimeapps.list | grep 'boxy-svg.desktop')" ];then
#remove broken mime association
if grep -qF 'image/svg+xml;application/illustrator=boxy-svg.desktop;' ~/.config/mimeapps.list ;then
echo "$(grep -vF 'image/svg+xml;application/illustrator=boxy-svg.desktop;' ~/.config/mimeapps.list)" > ~/.config/mimeapps.list
fi

if ! grep -qF 'boxy-svg.desktop' ~/.config/mimeapps.list ;then
echo "Associating the SVG mimetype with Boxy SVG..."
echo "[Added Associations]
image/svg+xml;application/illustrator=boxy-svg.desktop;" >> ~/.config/mimeapps.list
image/svg+xml=boxy-svg.desktop;
application/illustrator=boxy-svg.desktop;" >> ~/.config/mimeapps.list

fi

Expand Down

0 comments on commit 150cc41

Please sign in to comment.