feat!: change from wezterm to alacritty

Unfortunaly wezterm after updating started to have serious
perfomance problems.
This commit is contained in:
Gustavo "Guz" L. de Mello
2024-05-21 14:57:26 -03:00
parent 54b174b431
commit 9e128f124c
3 changed files with 85 additions and 13 deletions

View File

@@ -47,6 +47,30 @@ in {
};
};
programs.alacritty.settings.colors = with config.colorScheme.palette; rec {
primary = {
foreground = "#${base05}";
background = "#${base00}";
};
normal = {
black = "#${base02}";
red = "#${base08}";
green = "#${base0B}";
yellow = "#${base0A}";
blue = "#${base0D}";
magenta = "#${base0E}";
cyan = "#${base0C}";
white = "#${base05}";
};
bright = normal;
selection = {
text = primary.foreground;
background = primary.background;
};
};
programs.wezterm.config.color_scheme = mkDefault "system";
programs.wezterm.colorSchemes = mkIf (config.programs.wezterm.config.color_scheme == "system") {
system = with config.colorScheme.palette; {

View File

@@ -1,10 +1,15 @@
{pkgs, ...}: {
{
config,
pkgs,
...
}: {
imports = [
];
programs.hyprland.enable = true;
programs.hyprland.settings = let
mod = "SUPER";
terminal = "${config.profiles.gterminal.emulator.bin}";
librewolf = "${pkgs.librewolf}/bin/librewolf";
rofi = "${pkgs.rofi}/bin/rofi";
grim = "${pkgs.grim}/bin/grim";
@@ -18,8 +23,8 @@
"${mod}, V, togglefloating"
"${mod}, F, fullscreen"
"${mod}, Z, togglesplit"
"${mod}, Q, exec, ${pkgs.wezterm}/bin/wezterm"
"${mod}, E, exec, ${pkgs.wezterm}/bin/wezterm start lf"
"${mod}, Q, exec, ${terminal}"
"${mod}, E, exec, ${terminal} -e lf"
"${mod} + SHIFT, E, exec, ${librewolf}"
"${mod}, S, exec, ${rofi} -show drun -show-icons"
",Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}"

View File

@@ -13,6 +13,34 @@ in {
options.profiles.gterminal = with lib;
with lib.types; {
enable = mkEnableOption "";
emulator = {
enable = mkOption {
type = bool;
default = true;
};
pkg = mkOption {
type = package;
default = pkgs.alacritty;
};
bin = mkOption {
type = str;
default = "${cfg.emulator.pkg}/bin/alacritty";
};
};
shell = {
pkg = mkOption {
type = package;
default = pkgs.zsh;
};
bin = mkOption {
type = str;
default = "${pkgs.zsh}/bin/zsh";
};
defaultArgs = mkOption {
type = listOf str;
default = ["--login"];
};
};
};
config = with lib;
mkIf cfg.enable {
@@ -87,6 +115,7 @@ in {
bind -T prefix \\ split-window -h -c "#''''{pane_current_path}"
'';
tmux.keyMode = "vi";
tmux.newSession = true;
tmux.mouse = true;
tmux.prefix = "C-Space";
tmux.plugins = with pkgs; [
@@ -138,21 +167,35 @@ in {
};
extraConfig = '''';
}
{
plugin = tmuxPlugins.resurrect;
extraConfig = ''
set -g @resurrect-strategy-nvim 'session'
'';
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-boot 'on'
'';
}
];
tmux.shell = "${pkgs.zsh}/bin/zsh";
tmux.shell = cfg.shell.bin;
tmux.terminal = "screen-256color";
wezterm = {
alacritty = {
enable = mkDefault true;
config = {
default_prog = ["zsh" "--login"];
enable_wayland = false;
enable_tab_bar = false;
font = "lua wezterm.font(\"Fira Code\")";
font_size = 10;
settings = {
shell.program = cfg.shell.bin;
shell.args = cfg.shell.defaultArgs;
font = {
normal = {
family = "Fira Code";
style = "Regular";
};
size = 10;
};
};
enableZshIntegration = true;
};
zsh.enable = true;