From 6adea13069f1e58aa7f3db6be322d112b52daf4a Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sat, 30 Sep 2023 00:09:49 -0700 Subject: module: tmux --- modules/tmux.nix | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 modules/tmux.nix (limited to 'modules/tmux.nix') diff --git a/modules/tmux.nix b/modules/tmux.nix new file mode 100644 index 0000000..a049d39 --- /dev/null +++ b/modules/tmux.nix @@ -0,0 +1,52 @@ +{ config, pkgs, ... }: + +{ + programs.tmux = { + enable = true; + extraConfig = '' + set -g default-terminal "xterm-256color" + set -g history-limit 50000 + set -g base-index 1 + set -s escape-time 0 + set -g mouse on + set-option -g prefix C-a + unbind-key C-b + bind-key C-a send-prefix + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + bind r source-file ~/.tmux.conf + + # Enable vi keys. + setw -g mode-keys vi + + # Escape turns on copy mode + bind Escape copy-mode + + # v in copy mode starts making selection + bind-key -T copy-mode v send -X begin-selection + bind-key -T copy-mode y send -X copy-selection + + # make Prefix p paste the buffer. + unbind p + bind p paste-buffer + + set-option -g status-position top + set -g pane-border-style fg=colour8 + set -g pane-active-border-style fg=colour8 + + set -g status-justify right + set -g status-right "" + set -g status-left "" + set -g status-style "bg=default" + set -ag status-style "fg=colour7" + + set -g window-status-current-format "#[fg=colour15] #W" + set -g window-status-format "#[fg=colour8] #W" + + set -g status-left-length 100 + set -ag status-left "#[fg=colour8]time #[fg=colour15]#(date +"%I:%M%p") " + ''; + }; +} -- cgit v1.2.3