aboutsummaryrefslogtreecommitdiff
path: root/home-manager/xdg/default.nix
blob: de861bba1968322bdc8f7cd6f7595a17e10550fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ config, pkgs, ... }:
{
  xdg = {
    enable = true;

    portal = {
      enable = true; 
      config = {
        common = {
          default = [
            "wlr"
          ];
        };
      };

      extraPortals = with pkgs; [
        xdg-desktop-portal-gtk
      ];
    };

    mimeApps = {
      enable = true;  # manage ~/.config/mimeapps.list

      defaultApplications = {
        "application/pdf"         = [ "librewolf.desktop" ];
        "x-scheme-handler/http"   = [ "librewolf.desktop" ];
        "x-scheme-handler/https"  = [ "librewolf.desktop" ];
        "x-scheme-handler/chrome" = [ "librewolf.desktop" ];

        "text/html"               = [ "featherpad.desktop" ];

        "x-scheme-handler/discord" = [ "io.github.equicord.equibop.desktop" ];

        "x-scheme-handler/tg"      = [ "org.telegram.desktop.desktop" ];
        "x-scheme-handler/tonsite" = [ "org.telegram.desktop.desktop" ];

        "message/rfc822"           = [ "thunderbird.desktop" ];
        "x-scheme-handler/mailto"  = [ "thunderbird.desktop" ];
        "x-scheme-handler/mid"     = [ "thunderbird.desktop" ];
        "x-scheme-handler/feed"    = [ "thunderbird.desktop" ];
        "x-scheme-handler/webcal"  = [ "thunderbird.desktop" ];
        "x-scheme-handler/webcals" = [ "thunderbird.desktop" ];

        "image/png"  = [ "imv-dir.desktop" ];
        "image/jpeg" = [ "imv-dir.desktop" ];
        "image/svg+xml" = [ "featherpad.desktop" ];

        "application/pgp-keys" = [ "thunderbird.desktop" ];
        "application/octet-stream" = [ "org.gnome.FileRoller.desktop" ];
      };

      # Optional extra handlers that *don’t* become default
      associations.added = {
        "text/html" = [  "librewolf.desktop" ];
      };
    };
  };
}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.