aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/rofi/default.nix
blob: d40ccbb7e131304543848d4f41cf6649106cd2e0 (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
{
  config,
  lib,
  ...
}:
{
  options.desktop.rofi = {
    package = lib.mkOption {
      type = lib.types.package;
      readOnly = true;
      default = config.programs.rofi.finalPackage;
      description = "The rofi package to use.";
    };
  };

  config = lib.mkIf config.desktop.enable {
    programs.rofi = {
      enable = true;
      theme = "${config.scheme {
        template = builtins.readFile ./theme.mustache.rasi;
        extension = ".rasi";
      }}";
      extraConfig = {
        modi = "drun";
        show-icons = true;
        drun-display-format = "{name}";
        sort = true;
      };
    };
  };
}