diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-04-27 16:39:11 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-04-27 23:00:25 -0500 |
commit | b3f812688c6c30a2a02f6047523ef51afb40df7d (patch) | |
tree | 5baae99ed2c1776b0b71e7a9dc818d3f14df0f01 /pkgs/applications/kde/okular.nix | |
parent | 5e6adf78e9644e24ca494c3ba64400e5eea5bd1d (diff) |
kde/{kate,konqueror,okular}: decrease text mimetype preference
These .desktop files set InitialPreference>1 which will override other associations even the .desktop appears first in XDG_DATA_DIRS. This applies to: - org.kde.kate.desktop - org.kde.kwrite.desktop - kfmclient_html.desktop - okularApplication_txt.desktop Fixes #86137
Diffstat (limited to 'pkgs/applications/kde/okular.nix')
-rw-r--r-- | pkgs/applications/kde/okular.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/applications/kde/okular.nix b/pkgs/applications/kde/okular.nix index f07df73a25564..3bcdb9ca84244 100644 --- a/pkgs/applications/kde/okular.nix +++ b/pkgs/applications/kde/okular.nix @@ -18,6 +18,15 @@ mkDerivation { kwindowsystem libkexiv2 libspectre libzip phonon poppler qca-qt5 qtdeclarative qtsvg threadweaver kcrash ] ++ lib.optional (!stdenv.isAarch64) chmlib; + + # InitialPreference values are too high and end up making okular + # default for anything considered text/plain. Resetting to 1, which + # is the default. + postPatch = '' + substituteInPlace generators/txt/okularApplication_txt.desktop \ + --replace InitialPreference=3 InitialPreference=1 + ''; + meta = with lib; { homepage = "http://www.kde.org"; license = with licenses; [ gpl2 lgpl21 fdl12 bsd3 ]; |