2024-07-08 09:00:43 +00:00
|
|
|
{ lib, config, pkgs, ... }:
|
2024-05-30 21:01:29 +00:00
|
|
|
|
|
|
|
let
|
2024-08-09 03:09:09 +00:00
|
|
|
inherit (lib) getExe optionalString;
|
|
|
|
|
2024-05-30 21:01:29 +00:00
|
|
|
cfg = config.snowhawk.tmux;
|
2024-08-03 09:55:41 +00:00
|
|
|
sessionizer = cfg.sessionizer;
|
2024-08-21 00:33:18 +00:00
|
|
|
macos = config.snowhawk.macos.enable;
|
2024-05-30 21:01:29 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.snowhawk.tmux = {
|
|
|
|
enable = lib.mkEnableOption "tmux";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
programs.tmux = {
|
|
|
|
enable = true;
|
2024-08-21 00:33:18 +00:00
|
|
|
shell = getExe (if macos then pkgs.zsh else pkgs.fish);
|
2024-07-08 09:00:43 +00:00
|
|
|
mouse = true;
|
|
|
|
baseIndex = 1;
|
2024-07-28 21:20:40 +00:00
|
|
|
terminal = "screen-256color";
|
2024-07-08 09:00:43 +00:00
|
|
|
newSession = true;
|
2024-07-31 08:45:01 +00:00
|
|
|
escapeTime = 0;
|
2024-07-08 09:00:43 +00: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 14:21:13 +00:00
|
|
|
{ plugin = tmuxPlugins.vim-tmux-navigator; }
|
2024-07-08 09:00:43 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
set-option -g renumber-windows on
|
2024-07-31 08:54:51 +00:00
|
|
|
set-option -g focus-events on
|
2024-08-20 07:33:41 +00:00
|
|
|
set-option -g terminal-features 'alacritty:RGB'
|
2024-07-08 09:00:43 +00:00
|
|
|
|
|
|
|
bind '"' split-window -v -c "#{pane_current_path}"
|
|
|
|
bind % split-window -h -c "#{pane_current_path}"
|
2024-08-09 03:09:09 +00:00
|
|
|
'' + optionalString sessionizer.enable ''
|
|
|
|
bind-key -r f run-shell "tmux neww ${getExe sessionizer.pkg}"
|
2024-07-08 09:00:43 +00:00
|
|
|
'';
|
2024-05-30 21:01:29 +00:00
|
|
|
};
|
2024-08-04 09:28:10 +00:00
|
|
|
|
|
|
|
programs.fish.shellAbbrs = {
|
|
|
|
a = "tmux a";
|
|
|
|
};
|
2024-05-30 21:01:29 +00:00
|
|
|
};
|
|
|
|
}
|