{ config , pkgs , ... }: { programs.tmux = { enable = true; plugins = with pkgs; [ tmuxPlugins.fingers ]; extraConfig = '' set -g prefix C-a setw -g mode-keys vi unbind-key C-b bind-key C-a send-prefix bind r source-file ~/.config/tmux/tmux.conf set-option -g default-terminal xterm-256color-italic set escape-time 20 set -g mouse on set -g base-index 1 setw -g pane-base-index 1 # pane binds bind-key h select-pane -L bind-key j select-pane -D bind-key k select-pane -U bind-key l select-pane -R bind-key -r H resize-pane -L 5 bind-key -r J resize-pane -D 5 bind-key -r K resize-pane -U 5 bind-key -r L resize-pane -R 5 # window binds bind -n M-h previous-window bind -n M-l next-window bind-key "|" split-window -h -c "#{pane_current_path}" bind-key "-" split-window -v -c "#{pane_current_path}" bind-key s choose-session bind-key c new-window -c "#{pane_current_path}" bind-key ) swap-window -t +1 bind-key ( swap-window -t -1 bind-key [ copy-mode # statusline hide / unhide bind -n M-down set -q status off bind -n M-up set -q status on bind-key -r "<" swap-window -d -t -1 bind-key -r ">" swap-window -d -t +1 bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c " bind-key -T copy-mode-vi r send-keys -X rectangle-toggle bind P paste-buffer bind E command-prompt -p "Command:" \ "run \"tmux list-panes -a -F '##{session_name}:##{window_index}.##{pane_index}' \ | xargs -I PANE tmux send-keys -t PANE '%1' Enter\"" set-window-option -g allow-rename off set -g pane-border-style fg=colour11 set -g pane-active-border-style fg=colour8 set-option -g status-justify absolute-centre set-option -g status-position bottom set -g window-status-current-format " #[fg=colour15]#W#{?window_zoomed_flag, #[fg=colour2]+,}#{?window_activity_flag, #[fg=colour3]!,}" set -g window-status-format " #[fg=colour8]#W#{?window_zoomed_flag, #[fg=colour2]+,}" # status right set -g status-style "bg=colour0" set -ag status-style "fg=colour7" set -g status-right "#[fg=colour15]#(date +"%H%M") #[fg=colour8]hrs " set -ag status-right "#[fg=colour15]#(date +"%d/%m")#[fg=colour8] #(date +"%Y") " set -ag status-right "#[fg=colour7]#(bat -q)#[fg=colour12]" # status left set -g status-left "#[fg=colour7]#(/home/np/code/rust/prompt/target/debug/prompt cwd #{pane_current_path}) " set -ag status-left "#[fg=colour7]#(/home/np/code/rust/prompt/target/debug/prompt vcs #{pane_current_path})" ''; }; }