#redefine existing well-known key bidings by changing the starting path bind -N "Create a new window (starting with the current pane path)" c new-window -c "#{pane_current_path}" #bind -N "Split window vertically (starting with the current pane path)" " split-window -v -c '#{pane_current_path}' #bind -N "Split window horizontally (starting with the current pane path)" % split-window -h -c '#{pane_current_path}' # switch panes using Alt-arrow without prefix #bind -n M-Left select-pane -L #bind -n M-Right select-pane -R #bind -n M-Up select-pane -U #bind -n M-Down select-pane -D # Enable mouse mode (tmux 2.1 and above) set -g mouse on bind -N "Change to copy mode" Escape copy-mode bind -N "Paste the buffer" P paste-buffer bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection bind-key -T copy-mode-vi r send-keys -X rectangle-toggle bind -N "Save the content of the buffer into the clipboard" C-c run "tmux save-buffer - | xsel -bpi" set-option -g history-limit 100000 set-option -g renumber-windows on set -g default-terminal "tmux-256color" #set -g utf8 on # hack pour profiter du scroll du terminal (xterm ...) set -g terminal-overrides 'xterm*:smcup@:rmcup@' ##fix dirty bug of end/home note working vm/tmux #bind-key -n Home send Escape "OH" #bind-key -n End send Escape "OF" # Redraw the client (if interrupted by wall, etc.) bind -N "Redraw the client (if interrupted by wall, etc.)" R refresh-client # reload tmux config with ctrl + b + r unbind r bind -N "Reload tmux configuration" r source-file ~/.tmux.conf \; display-message 'Reloaded tmux config.' # quick-pane configuration: htop bind-key -N "Quick-pane: htop" h split-window -h "htop" #open tmux configuration in a side pane bind -N "Open tmux configuration in a side pane" M split-window -h "vim ~/.tmux.conf" #??? #bind-key ! break-pane -d -n _hidden_pane #bind-key @ join-pane -s $.0 ## Join windows: s, j bind-key -N "Join a pane from another session/window" j command-prompt -p "join pane from:" "join-pane -s '%%'" bind-key -N "Send a pane to another session/window" e command-prompt -p "send pane to:" "join-pane -t '%%'" #format: mysession:mywindow.mypane # Visual Activity Monitoring between windows setw -g monitor-activity off set -g visual-activity on #set -g visual-bell on # Automatically set window title #setw -g automatic-rename # Show tmux positions in titles set -g set-titles on set -g set-titles-string "[#S>#I:#W]" # Copy from tmux to system clipboard # Needs xclip -> emerge xclip #bind -t vi-copy y copy-pipe "xclip -sel clip -i" # initialize sessions #bind S source-file ~/.tmux/IMTA # =============== # Apparence and status bar # window segments in status line set -g window-status-separator "" #separator_powerline_left="" #separator_powerline_right="" separator_powerline_left="←" separator_powerline_right="→" setw -g window-status-format " #I:#W " setw -g window-status-current-format "$separator_powerline_right#I:#W$separator_powerline_left" # general status bar settings set -g status on set -g status-interval 5 set -g status-position bottom set -g status-justify left set -g status-right-length 100 # define widgets we're going to use in status bar wg_session="#S" wg_date="%Y-%m-%d %H:%M" wg_user_host="#(whoami)@#H" wg_battery="#(~/install/Battery/battery -t -g black)" set -g status-left "$wg_session" #set -g status-right "$wg_user_host | $wg_date $wg_battery" set -g status-right "$wg_user_host $wg_battery$wg_date" # Drag windows on the status bar bind-key -n MouseDrag1Status swap-window -d -t= # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'tmux-plugins/tmux-open' ##### # pre-defined themes # Tokyo theme: #set -g @plugin 'fabioluciano/tmux-tokyo-night' ## Tokyo Night Theme configuration #set -g @theme_variation 'moon' #set -g @theme_left_separator '' #set -g @theme_right_separator '' # Themepack: #set -g @plugin 'jimeh/tmux-themepack' # themepack configuration #set -g @themepack 'basic' #set -g @themepack 'powerline/block/cyan' # Nord theme: https://github.com/nordtheme/tmux #set -g @plugin "nordtheme/tmux" # Gruvbox theme: https://github.com/egel/tmux-gruvbox #set -g @plugin 'egel/tmux-gruvbox' #set -g @tmux-gruvbox 'dark' # or 'light' # Nova theme: https://github.com/o0th/tmux-nova #set -g @plugin 'o0th/tmux-nova' # colors-solarized theme: https://github.com/seebi/tmux-colors-solarized #set -g @plugin 'seebi/tmux-colors-solarized' ##### # Other examples: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'github_username/plugin_name#branch' # set -g @plugin 'git@github.com:user/plugin' # set -g @plugin 'git@bitbucket.com:user/plugin' #tmux-continuum set -g @continuum-restore 'on' #tmux-resurrect #for vim set -g @resurrect-strategy-vim 'session' set -g @resurrect-processes 'vim emacs man less more tail top htop mutt' #tmux-open set -g @open-S 'https://www.duckduckgo.com/?q=' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm'