summaryrefslogtreecommitdiff
path: root/common/programs/dunst.nix
blob: 78aadf5e87d21fe6a57de21acdd117e0f0537be6 (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
{
  lib,
  config,
  pkgs,
  ...
}:
let
  playSound = pkgs.writeShellScriptBin "play-notification-sound" ''
    ${pkgs.libcanberra-gtk3}/bin/canberra-gtk-play -i message
  '';
in
{
  config = lib.mkIf config.beeMods.windowManagers.beeConfig.enable {
    services.dunst = {
      enable = true;
      settings = {
        global = {
          font = "IosevkaInput 11";
          corner_radius = 0;
          frame_width = 2;
          markup = "yes";
          browser = "librewolf";

          origin = "top-center";
          offset = "(0, 4)";
        };
        urgency_low = {
          timeout = 3;
        };
        urgency_normal = {
          timeout = 5;
        };
        urgency_critical = {
          timeout = 0;
        };
        play_sound = {
          summary = "*";
          script = "${playSound}/bin/play-notification-sound";
        };
      };
    };
  };
}