diff options
author | tv <tv@krebsco.de> | 2023-01-11 17:34:26 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-01-11 17:36:05 +0100 |
commit | dba0afc600eb447b3fa088b0ef96d891fc7be2cc (patch) | |
tree | 2b5a96e3faa969c4ecd2e4d24c597cbeb1b533ec /tv/5pkgs/simple | |
parent | 339f5d7ad3a45bad7bc090178ecefcf9d308b465 (diff) |
tv alacritty: add x220 and hidpi variants
Diffstat (limited to 'tv/5pkgs/simple')
-rw-r--r-- | tv/5pkgs/simple/alacritty-tv.nix | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/tv/5pkgs/simple/alacritty-tv.nix b/tv/5pkgs/simple/alacritty-tv.nix index 447926cfb..9da850620 100644 --- a/tv/5pkgs/simple/alacritty-tv.nix +++ b/tv/5pkgs/simple/alacritty-tv.nix @@ -1,4 +1,6 @@ -{ pkgs }: +{ pkgs +, variant ? "x220" +}: let lib = import ./lib; @@ -6,7 +8,7 @@ let program = "${pkgs.font-size-alacritty}/bin/font-size-alacritty"; args = [arg]; }; - configs.default = { + configs.default = lib.recursiveUpdate variants.${variant} { bell.animation = "EaseOut"; bell.duration = 50; bell.color = "#ff00ff"; @@ -30,10 +32,6 @@ let colors.bright.cyan = "#72fbfb"; colors.bright.white = "#fbfbfb"; draw_bold_text_with_bright_colors = true; - font.normal.family = "Clean"; - font.bold.family = "Clean"; - font.bold.style = "Regular"; - font.size = 10; hints.enabled = [ { regex = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)[^\\u0000-\\u001F\\u007F-\\u009F<>\"\\s{-}\\^⟨⟩`]+"; @@ -42,12 +40,6 @@ let action = "Select"; } ]; - key_bindings = [ - { key = "Up"; mods = "Shift|Control"; command = font-size "=14"; } - { key = "Up"; mods = "Control"; command = font-size "+1"; } - { key = "Down"; mods = "Control"; command = font-size "-1"; } - { key = "Down"; mods = "Shift|Control"; command = font-size "=0"; } - ]; scrolling.multiplier = 8; }; configs.root = lib.recursiveUpdate configs.default { @@ -60,6 +52,30 @@ let window.dimensions.columns = 70; window.dimensions.lines = 9; }; + variants.hidpi = { + font.normal.family = "iosevka-tv-1"; + font.bold.family = "iosevka-tv-1"; + font.italic.family = "iosevka-tv-1"; + font.bold_italic.family = "iosevka-tv-1"; + font.size = 5; + key_bindings = [ + { key = "Up"; mods = "Control"; action = "IncreaseFontSize"; } + { key = "Down"; mods = "Control"; action = "DecreaseFontSize"; } + { key = "Down"; mods = "Shift|Control"; action = "ResetFontSize"; } + ]; + }; + variants.x220 = { + font.normal.family = "Clean"; + font.bold.family = "Clean"; + font.bold.style = "Regular"; + font.size = 10; + key_bindings = [ + { key = "Up"; mods = "Shift|Control"; command = font-size "=14"; } + { key = "Up"; mods = "Control"; command = font-size "+1"; } + { key = "Down"; mods = "Control"; command = font-size "-1"; } + { key = "Down"; mods = "Shift|Control"; command = font-size "=0"; } + ]; + }; writeProfile = name: config: let config-file = assert lib.types.filename.check name; |