Handling mime types.

Custom file type associations can be found in .config/mimeapps.list.

mimeopen -d filename

Associates a file type to a programm.

xdg-mime default nnn.desktop inode/directory

Updates the default application in case mimeopen doesn't take care of it.

xdg-mime query default text/css

Outputs the default application in use for the mime type.

Edit /usr/share/applications/defaults.list for system-wide mime type associations.

Edit ~/.config/mimeapps.list for user-wide mime type associations.
Set a different default file manager using a desktop file.

To add a new mime type see the example for gemini.

To change the default user directories, edit ~/.config/user-dirs.dirs.