# Use fish as default set -g default-shell /usr/sbin/fish # Enable 256-color and true-color (24-bit) support in tmux set -g default-terminal "screen-256color" # Set terminal type for 256-color support set -ga terminal-overrides ",*256col*:Tc" # Override to enable true-color for compatible terminals # General set -g set-clipboard on # Use system clipboard set -g detach-on-destroy off # Don't exit from tmux when closing a session set -g escape-time 0 # Remove delay for exiting insert mode with ESC in Neovim set -g history-limit 1000000 # Increase history size (from 2,000) set -g mouse on # Enable mouse support set -g status-interval 3 # Update the status bar every 3 seconds (default: 15 seconds) set -g allow-passthrough on # Allow programs in the pane to bypass tmux (e.g. for image preview) # Set prefix key unbind C-b # Unbind the default prefix key set -g prefix C-Space # Set new prefix key to Ctrl+Space # Refresh tmux config with r unbind r bind r source-file ~/.config/tmux/tmux.conf # New panes in current path bind c new-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" bind '"' split-window -v -c "#{pane_current_path}" # Set first window to index 1 (not 0) to map more to the keyboard layout set-option -g renumber-windows on set -g base-index 1 setw -g pane-base-index 1 # tpm plugin manager set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'hendrikmi/tmux-cpu-mem-monitor' # CPU and memory info # Some tweaks to the status bar set -g status-right "" set -g window-status-current-style "underscore" # Status bar set-option -g status on set-option -g status-interval 1 set-option -g status-justify centre set-option -g status-keys vi set-option -g status-position bottom set-option -g status-style fg=colour136,bg=colour235 set-option -g status-left-length 35 set-option -g status-left-style default set-option -g status-left "#[fg=green]#H #[fg=green,bright]#(uname -r | sed 's/-microsoft-standard//')#[default]" set-option -g status-right-length 140 set-option -g status-right-style default set-option -g status-right "#[fg=green]CPU: #{cpu -i 3} MEM: #{mem} DISK: #{disk --path /mnt/k -f}#[default] " set-option -ag status-right "#[fg=blue]%d.%m.%Y" set-window-option -g window-status-style fg=colour244 set-window-option -g window-status-style bg=default set-window-option -g window-status-current-style fg=colour166 set-window-option -g window-status-current-style bg=default # Create a single default session - because a session is created here, tmux # should be started with "tmux attach" rather than "tmux new" new -d -s1 -nfish 'fish -l' set -t1:1 monitor-activity on set -t1:1 aggressive-resize on neww -d neww -d # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm'