nixos/home/modules/tmux.nix

53 lines
1.3 KiB
Nix
Raw Normal View History

2024-07-08 02:00:43 -07:00
{ lib, config, pkgs, ... }:
2024-05-30 14:01:29 -07:00
let
2024-08-23 06:26:15 -07:00
inherit (lib) getExe;
2024-08-08 20:09:09 -07:00
2024-05-30 14:01:29 -07:00
cfg = config.snowhawk.tmux;
macos = config.snowhawk.macos.enable;
2024-05-30 14:01:29 -07:00
in
{
options.snowhawk.tmux = {
enable = lib.mkEnableOption "tmux";
};
config = lib.mkIf cfg.enable {
programs.tmux = {
enable = true;
2024-11-24 14:35:48 -08:00
shell = getExe (if macos then pkgs.zsh else pkgs.fish);
2024-11-15 08:39:32 -08:00
# shell = if macos then "/bin/zsh" else (getExe pkgs.fish);
2024-11-24 14:35:48 -08:00
# shell = getExe pkgs.fish;
2024-07-08 02:00:43 -07:00
mouse = true;
baseIndex = 1;
2024-07-28 14:20:40 -07:00
terminal = "screen-256color";
2024-07-08 02:00:43 -07:00
newSession = true;
2024-07-31 01:45:01 -07:00
escapeTime = 0;
2024-07-08 02:00:43 -07:00
plugins = with pkgs; [
{
plugin = tmuxPlugins.rose-pine;
extraConfig = ''
set -g @rose_pine_variant 'main' # Options are 'main', 'moon' or 'dawn'
set -g @rose_pine_host 'on'
set -g @rose_pine_date_time '%c' # %c is a good value but
'';
}
2024-07-28 07:21:13 -07:00
{ plugin = tmuxPlugins.vim-tmux-navigator; }
2024-07-08 02:00:43 -07:00
];
extraConfig = ''
set-option -g renumber-windows on
2024-07-31 01:54:51 -07:00
set-option -g focus-events on
set-option -g terminal-features 'alacritty:RGB'
2024-07-08 02:00:43 -07:00
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
'';
2024-05-30 14:01:29 -07:00
};
2024-08-04 02:28:10 -07:00
programs.fish.shellAbbrs = {
a = "tmux a";
};
2024-05-30 14:01:29 -07:00
};
}