My JSON and other plain text files were opening in Libre Office after I installed it. That is not something I appreciate. Here's how to change it to something else using xdg-mime.

See what is opening plain text files right now

$ xdg-mime query default text/plain

See a list of available applications

$ ls /usr/share/applications

Change default application

$ xdg-mime default mousepad.desktop text/plain

References

  • https://wiki.archlinux.org/index.php/Default_applications#XDG_standard
  • https://wiki.archlinux.org/index.php/Desktop_entries