nixos/home-manager/modules/tmux.nix

68 lines
1.8 KiB
Nix

{ inputs, pkgs, ... }: {
programs.tmux = {
enable = true;
disableConfirmationPrompt = true;
escapeTime = 0;
keyMode = "vi";
mouse = true;
plugins = with pkgs; [
tmuxPlugins.sensible
tmuxPlugins.yank
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @catppuccin_flavour 'frappe'
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " | "
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_status_modules_right "application session date_time"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator ""
'';
}
];
prefix = "C-Space";
terminal = "alacritty";
extraConfig = ''
# Fix colors
set-option -sa terminal-overrides ",alacritty:Tc"
# start window and panes indexing at 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Faster statusbar updates
set-option -g status-interval 1
# Easier movement
bind -n M-K previous-window
bind -n M-J next-window
# Better split bindings
bind "'" split-window -v -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"
# Vim keybindings for pane movement
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Status bar border
setw -g pane-border-status top
setw -g pane-border-format ''
# Bar to top
set-option -g status-position top
'';
};
}