Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Some discussion here- https://discourse.nixos.org/t/configure-how-xdg-open-opens-html-files/6419/22
On my computer currently- these are the liens in
mimeinfo.cache
meaning that pdf is (not) opened in Inkscape, directory is (at a leisurely pace) opened in Visual Studio Code and
mp4
(barely) opens in pqiv.At this point one would refer to Arch wiki to figure out how to override these settings manually. However, two of the probably most popular programs around this-
xdg-open
andmimeopen
do not concur on how to do so. It appears that they read different files. The obvious solution would be to link to another but that doesn't work because, in my recollection one of those files is such that it is deleted and recreated upon every edit.So it seems that the only sane solution is to override the global (computer-wide) defaults because everybody seems to respect that at least.
This code adds an option
programs.defaults.defaults
to achieve that.This is a work in progress and this doesn't actually work but I think I've done the hard part of actual logic, what I haven't managed is the final part of were to read mimeinfo.cache from
Things done
Not application because this doesn't work, I'm seeking help here Will update.