summaryrefslogtreecommitdiffstats
path: root/usecases/desktop/graphical/swaync.nix
blob: 34b7dba810c982c88411684d5442a3d366d44e1c (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
{ config, lib, ... }:
let
  cfg = config.reborn.swaync;
in
{
  options.reborn.swaync = {
    enable = lib.mkEnableOption "Reborn swaync config";
  };

  config = lib.mkIf cfg.enable {
    home-manager.users.minijackson.services.swaync = {
      enable = true;

      settings = {
        widgets = [
          "buttons-grid"
          "mpris"
          "volume"
          "backlight"
          "inhibitors"
          "title"
          "dnd"
          "notifications"
        ];
        widget-config = {
          buttons-grid.actions = [
            {
              label = "󰜉";
              command = "systemctl reboot";
            }
            {
              label = "󰐥";
              command = "systemctl poweroff";
            }
          ];
          volume = {
            label = "󰕾";
            show-per-app = true;
            show-per-app-label = true;
          };
        };
      };

      style = ./swaync.css;
    };
  };
}