nix-config/modules/tmux/extra-config.nix

37 lines
1.1 KiB
Nix

{
flake.modules.homeManager.base.programs.tmux.extraConfig = ''
set-option -g status-keys "vi"
set-option -sa terminal-features "''${TERM}:RGB"
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 5
bind -n C-Up resize-pane -U 5
set -g status-left ""
set -g status-right " #{session_name}"
set -g status-right-length 100
set -g status-style 'bg=#333333 fg=#5eacd3'
set -g window-status-activity-style none
bind c new-window -c "#{pane_current_path}"
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Vim-like pane navigation.
bind ^ last-window
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r f run-shell "tmux new-window start-tmux"
bind-key -r g run-shell "tmux new-window open-repo-url"
'';
}