nicks-nix-config/modules/tmux.nix

34 lines
783 B
Nix
Raw Permalink Normal View History

2023-10-14 10:17:53 -07:00
{ config, pkgs, lib, ... }:
let
in
{
programs.tmux = {
enable = true;
terminal = "xterm-256color";
# Change this for faster resizing, but less precise
resizeAmount = 5;
keyMode = "vi";
mouse = true;
shell = "${pkgs.zsh}/bin/zsh";
2023-10-14 11:30:58 -07:00
shortcut = "q";
escapeTime = 0;
extraConfig = ''
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 switching
bind -r ^ last-window
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# my-neovim-like panel splitting
bind -r v split-window -h
bind -r s split-window -v
'';
2023-10-14 10:17:53 -07:00
};
}