aboutsummaryrefslogtreecommitdiff
path: root/modules/foot.nix
blob: e0cabda08a423e5f6fae53fc9f062999cd9d09ef (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
59
60
61
62
63
64
65
66
67
68
69
70
{
  config,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.modules.foot;
  scheme = config.modules.scheme;
  fmt = col: lib.strings.removePrefix "#" col;
in
{
  options.modules.foot = {
    enable = lib.mkEnableOption "foot";
  };

  config = {
    programs.foot = lib.mkIf cfg.enable {
      enable = true;
      server = {
        enable = true;
      };
      settings = {
        main = {
          font = "monospace:size=12";
          title = "term";
          resize-by-cells = "no";
          pad = "0x0 center";
        };

        desktop-notifications.command = "notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
        url.label-letters = "arstneio";

        cursor = {
          style = "block";
          blink = "no";
        };

        colors = {
          # alpha=0.7;
          cursor = (fmt scheme.base00) + " " + (fmt scheme.base05);
          foreground = fmt scheme.base05;
          background = fmt scheme.base00;
          regular0 = fmt scheme.base01;
          regular1 = fmt scheme.base08;
          regular2 = fmt scheme.base0B;
          regular3 = fmt scheme.base0A;
          regular4 = fmt scheme.base0D;
          regular5 = fmt scheme.base0E;
          regular6 = fmt scheme.base0C;
          regular7 = fmt scheme.base06;
          bright0 = fmt scheme.base02;
          bright1 = fmt scheme.base12;
          bright2 = fmt scheme.base14;
          bright3 = fmt scheme.base13;
          bright4 = fmt scheme.base16;
          bright5 = fmt scheme.base17;
          bright6 = fmt scheme.base15;
          bright7 = fmt scheme.base07;
          "16" = fmt scheme.base09;
          "17" = fmt scheme.base0F;
          "18" = fmt scheme.base01;
          "19" = fmt scheme.base02;
          "20" = fmt scheme.base04;
          "21" = fmt scheme.base06;
        };
      };
    };
  };
}