|
# -------------------------------------------------- |
|
# Base |
|
# -------------------------------------------------- |
|
# Environments |
|
setenv -g 'LC_ALL' 'en_US.UTF-8' |
|
|
|
# Setup new sessions |
|
new -s tmuxsrv |
|
|
|
# remap prefix |
|
set -g prefix C-b |
|
|
|
# enable mouse support |
|
set -g mouse on |
|
|
|
# start windows and panes at 1, not 0 |
|
set -g base-index 1 |
|
set -gw pane-base-index 1 |
|
|
|
# Focus events enabled for terminals that support them |
|
set -g focus-events on |
|
|
|
# Super useful when using "grouped sessions" and multi-monitor setup |
|
setw -g aggressive-resize on |
|
|
|
# Address vim mode switching delay (http://superuser.com/a/252717/65504) |
|
set -s escape-time 0 |
|
|
|
# Increase scrollback buffer size from 2000 to 50000 lines |
|
set -g history-limit 50000 |
|
|
|
# -------------------------------------------------- |
|
# Bindings |
|
# -------------------------------------------------- |
|
#bind r source ~/.config/tmux/tmux.conf \; display-message "source tmux.conf done!" |
|
bind r source ~/.config/tmux/tmux.conf |
|
bind c command-prompt -p "window name:" "new-window; rename-window '%%'" |
|
|
|
# -------------------------------------------------- |
|
# Appearance |
|
# -------------------------------------------------- |
|
set -g default-terminal "tmux-256color" |
|
set -ga terminal-overrides ",*-256color*:Tc" |
|
|
|
# -------------------------------------------------- |
|
# Status Bar |
|
# -------------------------------------------------- |
|
set-option -g status on # turn the status bar on |
|
#set -g status-utf8 on # set utf-8 for the status bar |
|
set -g status-interval 5 # set update frequencey (default 15 seconds) |
|
set -g status-justify centre # center window list for clarity |
|
set-option -g status-position top # position the status bar at top of screen |
|
|
|
# Left side: show host name and IP address |
|
set -g status-left-length 60 |
|
set -g status-left " #S " |
|
#set -g status-left "#S #[fg=green,bg=black]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --interval 5)#[default]" |
|
set -g status-left-style "bg=blue,fg=white bold" |
|
|
|
# Right side: show session name, window & pane number, date and time |
|
set -g status-right-length 60 |
|
set -g status-right "#[fg=yellow]\"#U@#T:#(ip addr show dev vmbr0 | grep "inet[^6]" | awk '{print $2}')\" #[default]%Y-%m-%d %H:%M #{tmux_mode_indicator}" |
|
set -g status-style "bg=black,fg=brightwhite" |
|
|
|
#set -g allow-rename on |
|
set -gw automatic-rename off |
|
set -g allow-rename off |
|
|
|
set -gw clock-mode-colour "blue" |
|
|
|
set -gw pane-active-border-style "fg=magenta" |
|
set -gw pane-border-style "bg=black,fg=brightwhite" |
|
|
|
set -gw window-status-activity-style "fg=blue" |
|
set -gw window-status-bell-style "fg=yellow" |
|
set -gw window-status-current-format " #F#I:#W " |
|
set -gw window-status-current-style "bg=green,fg=black" |
|
set -gw window-status-format " #F#I:#W " |
|
set -gw window-status-last-style "fg=green" |
|
set -gw window-status-separator "" |
|
set -gw window-status-style "bg=black,fg=brightwhite" |
|
|
|
# Increase tmux messages display duration from 750ms to 4s |
|
set -g display-time 4000 |
|
set -g display-panes-active-colour "brightwhite" |
|
set -g display-panes-colour "black" |
|
|
|
set -g message-command-style "bg=black,fg=brightwhite" |
|
set -g message-style "bg=black,fg=brightwhite" |
|
|
|
# -------------------------------------------------- |
|
# Plugins |
|
# -------------------------------------------------- |
|
# List of plugins |
|
set -g @plugin 'tmux-plugins/tpm' |
|
#set -g @plugin 'tmux-plugins/tmux-sensible' |
|
|
|
# Resurrect |
|
set -g @plugin 'tmux-plugins/tmux-resurrect' |
|
set -g @resurrect-save 'S' |
|
set -g @resurrect-restore 'R' |
|
set -g @resurrect-capture-pane-contents 'on' |
|
set -g @resurrect-processes 'journalctl ssh nano mc lnav watch walias' |
|
# Continuum |
|
set -g @plugin 'tmux-plugins/tmux-continuum' |
|
set -g @continuum-boot 'on' |
|
set -g @continuum-systemd-start-cmd 'start-server' |
|
set -g @continuum-restore 'on' |
|
set -g @continuum-save-interval '0' |
|
|
|
# SideBar |
|
# prefix + Tab - toggle sidebar with a directory tree |
|
# prefix + Backspace - toggle sidebar and move cursor to it (focus it) |
|
set -g @sidebar-tree-width '100' |
|
set -g @plugin 'tmux-plugins/tmux-sidebar' |
|
set -g @sidebar-tree-command 'tree -pughDacFfCL 2' |
|
|
|
# Ssh Status |
|
set -g @plugin 'soyuka/tmux-current-pane-hostname' |
|
#set -g status-right '#[fg=red]%H:%M %d-%b#[default] #[fg=cyan,bold]#U@#H #[default]#[fg=blue]#(tmux display-message -p "#{pane_current_path}" | sed "s#$HOME#~#g") ' |
|
|
|
# Menus |
|
# default trigger is <prefix> \ |
|
set -g @plugin 'jaclu/tmux-menus' |
|
|
|
# Copying to system clipboard. |
|
# <prefix> y — copies text from the command line to the clipboard. |
|
set -g @plugin 'tmux-plugins/tmux-yank' |
|
|
|
# Mem-cpu-load indicator |
|
#set -g @plugin 'thewtex/tmux-mem-cpu-load' |
|
|
|
# Mode Indicator |
|
set -g @plugin 'MunifTanjim/tmux-mode-indicator' |
|
|
|
# Suspend |
|
# default trigger is F12 |
|
set -g @plugin 'MunifTanjim/tmux-suspend' |
|
# remove colors from status line for suspended state |
|
set -g @suspend_suspended_options " \ |
|
status-left-style::bg=brightblack\\,fg=white bold dim, \ |
|
status-right-style::fg=brightblack, \ |
|
window-status-current-style:gw:bg=brightblack\\,fg=black, \ |
|
window-status-last-style:gw:fg=brightblack, \ |
|
window-status-style:gw:bg=black\\,fg=brightblack, \ |
|
@mode_indicator_custom_prompt:: ---- , \ |
|
@mode_indicator_custom_mode_style::bg=brightblack\\,fg=black, \ |
|
" |
|
|
|
# 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' |
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) |
|
run '~/.config/tmux/plugins/tpm/tpm' |