aboutsummaryrefslogtreecommitdiffstats
path: root/users/hanna/configs/ghostty.nix
blob: ad27bed3ef5b23582db8cccd8ee8b65ffb3afcce (plain) (blame)
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
{ lib, profile, ... }:

let
  mkConfig = lib.generators.toKeyValue { listsAsDuplicateKeys = true; };
in {
  xdg.config.files."ghostty/config".text = lib.mkIf (profile != "wsl") (mkConfig ({
    theme = "Carbonfox";

    window-title-font-family = "Inter";
    window-padding-color = "extend";
    window-padding-x = 5;
    window-width = 112;
    window-height = 30;

    font-family = "Berkeley Mono";
    font-feature = [ "-calt" ];
    font-size = if (profile == "darwin") then 14 else 10;

    adjust-underline-thickness = "-50%";
    adjust-strikethrough-thickness = "-50%";
    adjust-overline-thickness = "-50%";

    cursor-style = "bar";
    cursor-style-blink = true;

    scrollback-limit = 10000;
    clipboard-write = "allow";
    clipboard-read = "ask";

    keybind = [
      "shift+enter=text:\\x1b\\r"
      "control+tab=toggle_tab_overview"
    ];
  } // lib.optionalAttrs (profile == "darwin") {
    macos-titlebar-style = "tabs";
    async-backend = "auto";
  } // lib.optionalAttrs (profile == "nixos") {
    gtk-titlebar-style = "tabs";
    async-backend = "io_uring";
    gtk-toolbar-style = "flat";
    window-theme = "ghostty";
    gtk-wide-tabs = true;
  }));
}