diff options
author | tdback <tyler@tdback.net> | 2024-12-21 15:32:13 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2024-12-21 15:32:13 -0500 |
commit | 0a5754541bb01e96021ca7ee74f1256a8ee68bc4 (patch) | |
tree | 2d0b8089e98239963a1e240cff676b1515fc8431 /users/tdback/modules/tmux |
initial commit to self-hosted git
Diffstat (limited to 'users/tdback/modules/tmux')
-rw-r--r-- | users/tdback/modules/tmux/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/users/tdback/modules/tmux/default.nix b/users/tdback/modules/tmux/default.nix new file mode 100644 index 0000000..8ac1c74 --- /dev/null +++ b/users/tdback/modules/tmux/default.nix @@ -0,0 +1,52 @@ +{ pkgs, ... }: +{ + programs.tmux = { + enable = true; + package = pkgs.tmux; + terminal = "tmux-256color"; + escapeTime = 0; + baseIndex = 0; + historyLimit = 10000; + mouse = true; + clock24 = true; + secureSocket = true; + aggressiveResize = true; + prefix = "C-t"; + extraConfig = '' + # Prevent detaching from tmux when closing a session. + set -g detach-on-destroy off + + # Kill the current session. + bind X kill-session + + # Splitting panes. + unbind v + unbind h + unbind % + unbind '"' + bind v split-window -h -c "#{pane_current_path}" # split vertically + bind h split-window -v -c "#{pane_current_path}" # split horizontally + + # Navigating panes. + bind ^ last-window + bind C-h select-pane -L + bind C-j select-pane -D + bind C-k select-pane -U + bind C-l select-pane -R + + # Copy mode movements. + set-window-option -g mode-keys vi + unbind -T copy-mode-vi Space; + unbind -T copy-mode-vi Enter; + 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" + + # Customizing status bar. + set -g status-position bottom + set -g status-style "bg=#050505 fg=#C5C8C6" + set -g status-right "" + setw -g window-status-current-format " #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F" + setw -g window-status-format " #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F" + ''; + }; +} |