diff --git a/hosts/battleship/desktop/colors/default.nix b/hosts/battleship/desktop/colors/default.nix index bc8389e..7c8b0cd 100644 --- a/hosts/battleship/desktop/colors/default.nix +++ b/hosts/battleship/desktop/colors/default.nix @@ -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; { diff --git a/hosts/battleship/desktop/keymaps.nix b/hosts/battleship/desktop/keymaps.nix index 4489ef1..7e9438c 100644 --- a/hosts/battleship/desktop/keymaps.nix +++ b/hosts/battleship/desktop/keymaps.nix @@ -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}" diff --git a/modules/home-manager/profiles/gterminal.nix b/modules/home-manager/profiles/gterminal.nix index 2c62eaf..51091d5 100644 --- a/modules/home-manager/profiles/gterminal.nix +++ b/modules/home-manager/profiles/gterminal.nix @@ -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;