summaryrefslogtreecommitdiffstats
path: root/modules/programs/tmux/default.nix
blob: b141af690ac5d9e77143e08024d20fc6a74572fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ config, lib, pkgs, user, ... }:
with lib;
{
    config.home-manager.users.${user} = {
        programs.tmux = {
            enable = true;
            terminal = "tmux-256color";
            historyLimit = 10000;
            plugins = with pkgs.tmuxPlugins;
            [
                catppuccin
                vim-tmux-navigator
                sensible
                yank
            ];
            shell = "${pkgs.zsh}/bin/zsh";
            extraConfig = ''
set-option -sa terminal-overrides ",xterm*:Tc"
set -g mouse on

unbind C-b
set -g prefix C-Space
bind C-Space send-prefix

bind -n M-H previous-window
bind -n M-L next-window

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

bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel

bind '"' split-window -v -c ''${pane_current_path}"
bind % split-window -h -c ''${pane_current_path}"
            '';
        };
    };
}