From a29372ef9983d948f7b547c83ff17c7decf3822a Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 31 May 2024 19:13:23 +0100 Subject: [PATCH] Try using wezterm as my default terminal --- lib/nixos/home-manager/desktop.nix | 1 - lib/nixos/home-manager/modules/alacritty.nix | 34 -------------------- lib/nixos/home-manager/modules/sway.nix | 2 +- lib/shared/modules/tmux.nix | 2 +- lib/shared/modules/wezterm.nix | 21 +++++++++++- 5 files changed, 22 insertions(+), 38 deletions(-) delete mode 100644 lib/nixos/home-manager/modules/alacritty.nix diff --git a/lib/nixos/home-manager/desktop.nix b/lib/nixos/home-manager/desktop.nix index 7e580c4..0c053f6 100644 --- a/lib/nixos/home-manager/desktop.nix +++ b/lib/nixos/home-manager/desktop.nix @@ -1,6 +1,5 @@ { config, inputs, pkgs, username, }: { imports = [ - ./modules/alacritty.nix ./modules/copyq.nix ./modules/dunst.nix ./modules/espanso.nix diff --git a/lib/nixos/home-manager/modules/alacritty.nix b/lib/nixos/home-manager/modules/alacritty.nix deleted file mode 100644 index a6e7997..0000000 --- a/lib/nixos/home-manager/modules/alacritty.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib, pkgs, self, ... }: -let - inherit (lib) strings; - inherit (strings) toInt; - - theme = import "${self}/lib/theme" { inherit pkgs; }; -in { - programs.alacritty = { - enable = true; - - settings = { - env = { - TERM = "screen-256color"; - }; - - window.padding = { - x = 15; - y = 15; - }; - - font = { - size = toInt "${theme.fonts.monospace.size}"; - - bold.style = "Regular"; - normal.family = "${theme.fonts.monospace.name}"; - - offset.y = 12; - glyph_offset.y = 6; - }; - - shell = { program = "zsh"; }; - }; - }; -} diff --git a/lib/nixos/home-manager/modules/sway.nix b/lib/nixos/home-manager/modules/sway.nix index 4c28f17..a740296 100644 --- a/lib/nixos/home-manager/modules/sway.nix +++ b/lib/nixos/home-manager/modules/sway.nix @@ -115,7 +115,7 @@ eDP-1 = { scale = "1.0"; }; }; - terminal = "alacritty"; + terminal = "wezterm"; window.border = 3; }; diff --git a/lib/shared/modules/tmux.nix b/lib/shared/modules/tmux.nix index 4aa62c3..9ed869b 100644 --- a/lib/shared/modules/tmux.nix +++ b/lib/shared/modules/tmux.nix @@ -6,7 +6,7 @@ in { tmuxinator.enable = true; - terminal = "screen-256color"; + terminal = "xterm-256color"; extraConfig = '' unbind C-b diff --git a/lib/shared/modules/wezterm.nix b/lib/shared/modules/wezterm.nix index 2ea9cbc..028dd33 100644 --- a/lib/shared/modules/wezterm.nix +++ b/lib/shared/modules/wezterm.nix @@ -1,6 +1,25 @@ -{ +{ pkgs, self, ... }: +let + theme = import "${self}/lib/theme" { inherit pkgs; }; +in { programs.wezterm = { enable = true; enableZshIntegration = true; + + extraConfig = '' + return { + font = wezterm.font "${theme.fonts.monospace.name}", + -- TODO: use theme.fonts.monospace.size + font_size = 14.0, + hide_tab_bar_if_only_one_tab = true, + line_height = 1.5, + window_padding = { + bottom = 10, + left = 10, + right = 10, + top = 10, + } + } + ''; }; }