diff options
| author | tv <tv@krebsco.de> | 2024-06-06 20:52:08 +0200 | 
|---|---|---|
| committer | tv <tv@krebsco.de> | 2024-06-06 21:01:46 +0200 | 
| commit | e3816a610701660ade0b8804e3bb204701f42c83 (patch) | |
| tree | 05b00fb221ddd99a3a9b9d86b739abb3784e5aa3 | |
| parent | b18a55f41af2cf67e93a1082a96f3e498b341240 (diff) | |
alacritty: modernize config
| -rw-r--r-- | configs/alacritty.nix | 12 | ||||
| -rw-r--r-- | pkgs/simple/alacritty-tv.nix | 6 | 
2 files changed, 10 insertions, 8 deletions
diff --git a/configs/alacritty.nix b/configs/alacritty.nix index 25fb2c3..0e4f42b 100644 --- a/configs/alacritty.nix +++ b/configs/alacritty.nix @@ -24,7 +24,7 @@ let      colors.bright.magenta     = "#fb53fb";      colors.bright.cyan        = "#72fbfb";      colors.bright.white       = "#fbfbfb"; -    draw_bold_text_with_bright_colors = false; +    colors.draw_bold_text_with_bright_colors = false;      hints.enabled = [        {          regex = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)[^\\u0000-\\u001F\\u007F-\\u009F<>\"\\s{-}\\^⟨⟩`]+"; @@ -51,7 +51,7 @@ let      font.bold.family        = "iosevka tv 2 Medium";      font.bold_italic.family = "iosevka tv 2 Medium";      font.size = 5; -    key_bindings = [ +    keyboard.bindings = [        { key = "Up";   mods = "Control";       action = "IncreaseFontSize"; }        { key = "Down"; mods = "Control";       action = "DecreaseFontSize"; }        { key = "Down"; mods = "Shift|Control"; action = "ResetFontSize"; } @@ -62,7 +62,7 @@ let      font.bold.family = "Clean";      font.bold.style = "Regular";      font.size = 10; -    key_bindings = let +    keyboard.bindings = let        font-size = arg: {          program = "${pkgs.font-size-alacritty}/bin/font-size-alacritty";          args = [arg]; @@ -80,13 +80,15 @@ let      leg = "hidpi";      ru = "hidpi";    }.${config.krebs.build.host.name} or "x220"; + +  format = pkgs.formats.toml {};  in  {    environment.etc =      lib.mapAttrs' -      (name: config: lib.nameValuePair "alacritty/${name}.json" { -        source = pkgs.writeJSON "alacritty-${name}.json" config; +      (name: config: lib.nameValuePair "alacritty/${name}.toml" { +        source = format.generate "alacritty-${name}.toml" config;        })        configs; diff --git a/pkgs/simple/alacritty-tv.nix b/pkgs/simple/alacritty-tv.nix index 0e65434..bea5776 100644 --- a/pkgs/simple/alacritty-tv.nix +++ b/pkgs/simple/alacritty-tv.nix @@ -7,7 +7,7 @@ pkgs.symlinkJoin {        # usage:        #   alacritty [--profile=PROFILE] [--singleton] [ARGS...]        # where -      #   PROFILE must have a corresponding file /etc/alacritty/PROFILE.json +      #   PROFILE must have a corresponding file /etc/alacritty/PROFILE.toml        set -efu @@ -18,12 +18,12 @@ pkgs.symlinkJoin {            shift        esac -      config=/etc/alacritty/$profile.json +      config=/etc/alacritty/$profile.toml        if ! test -e "$config"; then          echo "$0: warning: bad profile: $profile; using default instead" >&2          profile=default -        config=/etc/alacritty/default.json +        config=/etc/alacritty/default.toml        fi        case ''${1-} in  | 
