all repos — dotfiles @ 0a867ad2e58c21d31f0ce106ab5812a152c6b83f

my *nix dotfiles

programs/alacritty.nix (view raw)

 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
 71
 72
{ config
, pkgs
, lib
, ...
}:
let
  isDarwin = lib.strings.hasSuffix "darwin" pkgs.stdenv.hostPlatform.system;

  fontConfig =
    if isDarwin then {
      normal = { family = "SF Mono"; style = "Light"; };
      bold = { family = "SF Mono"; style = "Semibold"; };
      italic = { family = "SF Mono"; style = "Light Italic"; };
      size = 15.0;
      offset.y = 5;
    }
    else {
      normal = { family = "Input"; style = "Regular"; };
      bold = { family = "Input"; style = "Bold"; };
      italic = { family = "Input"; style = "Italic"; };
      size = 12.0;
    };
in
{
  programs.alacritty = {
    enable = true;
    settings = {
      window = {
        padding.x = 10;
        padding.y = 10;
        dynamic_padding = true;
        decorations = "None";
        startup_mode = "Maximized";


        option_as_alt = "OnlyLeft";
      };

      font = fontConfig;
      cursor.style = "Beam";


      colors = {
        primary = {
          background = "0xf4f4f4";
          foreground = "0x676767";
        };
        normal = {
          black = "0xf4f4f4";
          red = "0xdb7070";
          green = "0x7c9f4b";
          yellow = "0xd69822";
          blue = "0x6587bf";
          magenta = "0xb870ce";
          cyan = "0x509c93";
          white = "0x676767";
        };
        bright = {
          black = "0xaaaaaa";
          red = "0xc66666";
          green = "0x6d8b42";
          yellow = "0xe7e7e7";
          blue = "0x8a8a8a";
          magenta = "0xa262b5";
          cyan = "0x43827b";
          white = "0x525252";
        };
      };

    };
  };
}