2023-01-30 02:10:12 +00:00
|
|
|
{ config, sane-lib, ...}:
|
2023-01-28 09:22:11 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
www = config.sane.web-browser.browser.desktop;
|
|
|
|
pdf = "org.gnome.Evince.desktop";
|
|
|
|
md = "obsidian.desktop";
|
|
|
|
thumb = "org.gnome.gThumb.desktop";
|
|
|
|
video = "vlc.desktop";
|
|
|
|
# audio = "mpv.desktop";
|
|
|
|
audio = "vlc.desktop";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
# the xdg mime type for a file can be found with:
|
|
|
|
# - `xdg-mime query filetype path/to/thing.ext`
|
2023-01-28 09:26:29 +00:00
|
|
|
# we can have single associations or a list of associations.
|
|
|
|
# there's also options to *remove* [non-default] associations from specific apps
|
2023-01-28 09:22:11 +00:00
|
|
|
xdg.mime.enable = true;
|
|
|
|
xdg.mime.defaultApplications = {
|
2023-01-28 09:26:29 +00:00
|
|
|
# AUDIO
|
|
|
|
"audio/flac" = audio;
|
|
|
|
"audio/mpeg" = audio;
|
|
|
|
"audio/x-vorbis+ogg" = audio;
|
2023-01-28 09:22:11 +00:00
|
|
|
# IMAGES
|
2023-01-28 09:26:29 +00:00
|
|
|
"image/heif" = thumb; # apple codec
|
|
|
|
"image/png" = thumb;
|
|
|
|
"image/jpeg" = thumb;
|
2023-01-28 09:22:11 +00:00
|
|
|
# VIDEO
|
2023-01-28 09:26:29 +00:00
|
|
|
"video/mp4" = video;
|
|
|
|
"video/quicktime" = video;
|
|
|
|
"video/x-matroska" = video;
|
|
|
|
# HTML
|
|
|
|
"text/html" = www;
|
|
|
|
"x-scheme-handler/http" = www;
|
|
|
|
"x-scheme-handler/https" = www;
|
|
|
|
"x-scheme-handler/about" = www;
|
|
|
|
"x-scheme-handler/unknown" = www;
|
|
|
|
# RICH-TEXT DOCUMENTS
|
|
|
|
"application/pdf" = pdf;
|
|
|
|
"text/markdown" = md;
|
2023-01-28 09:22:11 +00:00
|
|
|
};
|
|
|
|
}
|