From a484af41be5eb7bfcfdbf480417673abc2b8d5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20K=C3=A4nner?= Date: Sun, 29 Dec 2024 15:57:40 +0100 Subject: [PATCH] use wezterm instead of foot --- modules/home/programs/default.nix | 3 +- modules/home/programs/wezterm.nix | 56 +++++++++++++++++++++++++++++++ modules/home/sway/default.nix | 10 +++--- 3 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 modules/home/programs/wezterm.nix diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index 9fe6a7d..9cf96db 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -6,7 +6,7 @@ }: let cfg = config.myConfig.programs; in { - imports = [./foot.nix ./thunderbird.nix ./nextcloud.nix ./udiskie.nix]; + imports = [./foot.nix ./thunderbird.nix ./nextcloud.nix ./udiskie.nix ./wezterm.nix]; options.myConfig.programs = { enable = lib.mkEnableOption "programs for desktop use"; @@ -15,6 +15,7 @@ in { config = lib.mkIf cfg.enable { myConfig.programs = { foot.enable = lib.mkDefault true; + wezterm.enable = lib.mkDefault true; thunderbird.enable = lib.mkDefault true; nextcloud.enable = lib.mkDefault true; udiskie.enable = lib.mkDefault true; diff --git a/modules/home/programs/wezterm.nix b/modules/home/programs/wezterm.nix new file mode 100644 index 0000000..a033967 --- /dev/null +++ b/modules/home/programs/wezterm.nix @@ -0,0 +1,56 @@ +{ + lib, + config, + ... +}: let + cfg = config.myConfig.programs.wezterm; +in { + options.myConfig.programs.wezterm = { + enable = lib.mkEnableOption "wezterm, a wayland terminal emulator"; + }; + + config = lib.mkIf cfg.enable { + programs.wezterm = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + colorSchemes = { + myTheme = { + ansi = [ + "#26211e" + "#f75b72" + "#67af34" + "#c98b1a" + "#509af6" + "#ca64f3" + "#1faeae" + "#c1b7b0" + ]; + brights = [ + "#585049" + "#fb8590" + "#75c73b" + "#e49f27" + "#77b1fb" + "#d68af7" + "#24c6c6" + "#f2f0ef" + ]; + background = "#0a0807"; + foreground = "#e6e2de"; + }; + }; + extraConfig = '' + local wezterm = require 'wezterm' + local config = wezterm.config_builder() + + config.font = wezterm.font 'FiraCode Nerd Font Mono' + config.front_end = 'WebGpu' + config.enable_tab_bar = false + config.color_scheme = 'myTheme' + + return config + ''; + }; + }; +} diff --git a/modules/home/sway/default.nix b/modules/home/sway/default.nix index 6234174..996233c 100644 --- a/modules/home/sway/default.nix +++ b/modules/home/sway/default.nix @@ -64,7 +64,7 @@ in { home.packages = with pkgs; [ swaylock # screen locking swayidle # automatic screen locking after system idle time - foot # terminal + wezterm # terminal keepassxc # used for secrets instead of gnome-keyring # fonts @@ -171,11 +171,11 @@ in { }; menu = "${pkgs.nwg-launchers}/bin/nwggrid -client"; - # use foot as default terminal - terminal = "${pkgs.foot}/bin/foot"; + # use wezterm as default terminal + terminal = "${pkgs.wezterm}/bin/wezterm"; assigns = { "main" = [{app_id = "firefox";}]; - "term" = [{app_id = "foot-startup";}]; + "term" = [{app_id = "start-terminal";}]; "msg" = [ {title = "\\[Locked\\] - KeePassXC$";} {app_id = "thunderbird";} @@ -202,7 +202,7 @@ in { {command = "${dbus-sway-environment}/bin/dbus-sway-environment";} {command = "${pkgs.nwg-launchers}/bin/nwggrid-server -fp";} {command = "${pkgs.keepassxc}/bin/keepassxc";} - {command = "${pkgs.foot}/bin/foot -a foot-startup";} + {command = "${pkgs.wezterm}/bin/wezterm start --class start-terminal";} {command = "${pkgs.networkmanagerapplet}/bin/nm-applet";} {command = "${pkgs.firefox}/bin/firefox";} ]