# change prefix unbind C-b set -g prefix C-f bind C-f send-prefix # reload bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf \; display "Config Reloaded" # window creation bind n new-window bind | split-window -v bind - split-window -h # window navigation bind Tab next-window bind BTab previous-window # pane navigation bind -n M-l select-pane -R bind -n M-h select-pane -L bind -n M-k select-pane -U bind -n M-j select-pane -D bind -n M-o last-pane # pane resizing bind -r C-l resize-pane -R 2 bind -r C-h resize-pane -L 2 bind -r C-k resize-pane -U bind -r C-j resize-pane -D # pane selection (mouse) # set -g mouse utf8 on set -g mouse on # copy-mode bind C-c copy-mode # nested sessions #Variables color_status_text="color245" color_window_off_status_bg="color238" color_light="white" #color015 color_dark="color232" # black= color232 color_window_off_status_current_bg="color254" # window-status-current-format and window-status-current-style control how the # status bar looks and the window label in it # "root" is the default key table, and "key-table" (the variable) is set to # "off" which is a different table # the if statement send the cancel command to exit copy mode if we are in # copy mode # set prefix to None to "turn off" the root keymap bind -T root F12 \ set prefix None \;\ set key-table off \;\ set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\ set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\ set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\ if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ refresh-client -S \;\ # in the "off" map, pressing F12 unsets all the stuff from above bind -T off F12 \ set -u prefix \;\ set -u key-table \;\ set -u status-style \;\ set -u window-status-current-style \;\ set -u window-status-current-format \;\ refresh-client -S # a string that shows the keymap is "off" wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]" # a status indicator to the right (which shows nothing, and idk if I really care about) # the sysstat stuff comes from a plugin (https://github.com/samoshkin/tmux-plugin-sysstat) set -g status-right "$wg_is_keys_off #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host" # special stuff for remote sessions if-shell 'test -n "$SSH_CLIENT"' 'source-file ~/.config/tmux/tmux.remote.conf'