From d2d58a7612b886f8df27e6a78ab1a65de82eb3d5 Mon Sep 17 00:00:00 2001 From: dadada Date: Sat, 20 Mar 2021 15:28:15 +0100 Subject: [PATCH] Switch from kitty to alacritty --- hosts/gorgon/home/default.nix | 2 +- hosts/gorgon/work/default.nix | 2 +- modules/home/alacritty/default.nix | 69 ++++++++++++++++++++++++++++++ modules/home/default.nix | 1 + modules/home/kitty/config | 12 +++--- 5 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 modules/home/alacritty/default.nix diff --git a/hosts/gorgon/home/default.nix b/hosts/gorgon/home/default.nix index afa28c7..16ef69b 100644 --- a/hosts/gorgon/home/default.nix +++ b/hosts/gorgon/home/default.nix @@ -2,12 +2,12 @@ let this = import ../../.. { inherit pkgs; }; useFeatures = [ + "alacritty" "vim" "direnv" "git" "gpg" "gtk" - "kitty" "keyring" "ssh" "sway" diff --git a/hosts/gorgon/work/default.nix b/hosts/gorgon/work/default.nix index a7e0fb0..fcdfdcd 100644 --- a/hosts/gorgon/work/default.nix +++ b/hosts/gorgon/work/default.nix @@ -12,7 +12,7 @@ in gpg.enable = true; gtk.enable = true; keyring.enable = true; - kitty.enable = true; + alacritty.enable = true; ssh.enable = true; tmux.enable = true; xdg.enable = true; diff --git a/modules/home/alacritty/default.nix b/modules/home/alacritty/default.nix new file mode 100644 index 0000000..8c9c5b5 --- /dev/null +++ b/modules/home/alacritty/default.nix @@ -0,0 +1,69 @@ +{ pkgs, lib, config, ... }: +with lib; +let + cfg = config.dadada.home.alacritty; +in +{ + options.dadada.home.alacritty = { + enable = mkEnableOption "Enable alacritty config"; + }; + config = mkIf cfg.enable { + programs.alacritty = { + enable = true; + settings = { + scrolling.history = 0; + font.size = 9; + shell.program = "tmux"; + window.decorations = "none"; + colors = { + # Base16 Spacemacs 256 - alacritty color config + # Nasser Alshammari (https://github.com/nashamri/spacemacs-theme) + # Default colors + primary = { + background = "0x1f2022"; + foreground = "0xa3a3a3"; + }; + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor = { + text = "0x1f2022"; + cursor = "0xa3a3a3"; + }; + + # Normal colors + normal = { + black = "0x1f2022"; + red = "0xf2241f"; + green = "0x67b11d"; + yellow = "0xb1951d"; + blue = "0x4f97d7"; + magenta = "0xa31db1"; + cyan = "0x2d9574"; + white = "0xa3a3a3"; + }; + + # Bright colors + bright = { + black = "0x585858"; + red = "0xf2241f"; + green = "0x67b11d"; + yellow = "0xb1951d"; + blue = "0x4f97d7"; + magenta = "0xa31db1"; + cyan = "0x2d9574"; + white = "0xf8f8f8"; + }; + + indexed_colors = [ + { index = 16; color = "0xffa500"; } + { index = 17; color = "0xb03060"; } + { index = 18; color = "0x282828"; } + { index = 19; color = "0x444155"; } + { index = 20; color = "0xb8b8b8"; } + { index = 21; color = "0xe8e8e8"; } + ]; + }; + }; + }; + }; +} diff --git a/modules/home/default.nix b/modules/home/default.nix index cb610f8..17d41d6 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,4 +1,5 @@ { + alacritty = ./alacritty; colors = ./colors.nix; direnv = ./direnv.nix; fish = ./fish.nix; diff --git a/modules/home/kitty/config b/modules/home/kitty/config index 4f068db..4c73ef6 100644 --- a/modules/home/kitty/config +++ b/modules/home/kitty/config @@ -1,18 +1,18 @@ -font_family Source Code Pro -font_size 10 +font_family monospace +font_size 9 bold_font auto italic_font auto bold_italic_font auto copy_on_select no -clipboard_control read-clipboard write-clipboard no-append +clipboard_control no-append write-clipboard read-clipboard allow_hyperlinks yes detect_urls yes strip_trailing_spaces never window_alert_on_bell yes enable_audio_bell yes bell_on_tab yes -tab_bar_style hidden -scrollback_lines 0 +tab_bar_style hide +scrollback_lines 20000 map ctrl+shift+v no_op map ctrl+shift+c no_op @@ -59,4 +59,4 @@ color19 #444155 color20 #b8b8b8 color21 #e8e8e8 -shell tmux +#shell tmux