removed support for tmux < 2.4
This commit is contained in:
parent
5641d3b3f5
commit
5b9df82184
3 changed files with 9 additions and 60 deletions
52
.tmux.conf
52
.tmux.conf
|
@ -109,27 +109,6 @@ bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}"
|
|||
bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id} #{pane_current_path}"
|
||||
|
||||
|
||||
# -- list choice (tmux < 2.4) --------------------------------------------------
|
||||
|
||||
# vi-choice is gone in tmux >= 2.4
|
||||
run -b 'tmux bind -t vi-choice h tree-collapse 2> /dev/null || true'
|
||||
run -b 'tmux bind -t vi-choice l tree-expand 2> /dev/null || true'
|
||||
run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null || true'
|
||||
run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null || true'
|
||||
run -b 'tmux bind -t vi-choice H tree-collapse-all 2> /dev/null || true'
|
||||
run -b 'tmux bind -t vi-choice L tree-expand-all 2> /dev/null || true'
|
||||
run -b 'tmux bind -t vi-choice Escape cancel 2> /dev/null || true'
|
||||
|
||||
|
||||
# -- edit mode (tmux < 2.4) ----------------------------------------------------
|
||||
|
||||
# vi-edit is gone in tmux >= 2.4
|
||||
run -b 'tmux bind -ct vi-edit H start-of-line 2> /dev/null || true'
|
||||
run -b 'tmux bind -ct vi-edit L end-of-line 2> /dev/null || true'
|
||||
run -b 'tmux bind -ct vi-edit q cancel 2> /dev/null || true'
|
||||
run -b 'tmux bind -ct vi-edit Escape cancel 2> /dev/null || true'
|
||||
|
||||
|
||||
# -- copy mode -----------------------------------------------------------------
|
||||
|
||||
bind Enter copy-mode # enter copy mode
|
||||
|
@ -1069,15 +1048,8 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \
|
||||
# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \
|
||||
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \
|
||||
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g')
|
||||
#
|
||||
# if [ -n "$(tmux display -p '#{version}')" ]; then
|
||||
# status_left=$(echo "$status_left" | sed \
|
||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
|
||||
# else
|
||||
# status_left=$(echo "$status_left" | sed \
|
||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_pid} #{b:pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
|
||||
# fi
|
||||
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
|
||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
|
||||
#
|
||||
# status_left=$(printf '%s' "$status_left" | awk \
|
||||
# -v status_bg="$tmux_conf_theme_status_bg" \
|
||||
|
@ -1157,15 +1129,8 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \
|
||||
# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \
|
||||
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \
|
||||
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g')
|
||||
#
|
||||
# if [ -z "$(tmux display -p '#{version}')" ]; then
|
||||
# status_right=$(echo "$status_right" | sed \
|
||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
|
||||
# else
|
||||
# status_right=$(echo "$status_right" | sed \
|
||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_pid} #{b:pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
|
||||
# fi
|
||||
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
|
||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
|
||||
#
|
||||
# status_right=$(printf '%s' "$status_right" | awk \
|
||||
# -v status_bg="$tmux_conf_theme_status_bg" \
|
||||
|
@ -1440,10 +1405,6 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# tmux set -gu '@tpm-install' \; set -gu '@tpm-update' \; set -gu '@tpm-clean' \; set -gu '@plugin'
|
||||
# fi
|
||||
# fi
|
||||
#
|
||||
# if [ -z "$window_active" ] && [ $_tmux_version -lt 240 ]; then
|
||||
# tmux run -b "sleep $(expr $(tmux display -p '#{display-time}') / 500) && tmux set display-time 3000 \; display 'This configuration will soon require tmux 2.4+' \; set -u display-time"
|
||||
# fi
|
||||
# }
|
||||
#
|
||||
# _apply_plugins() {
|
||||
|
@ -1468,7 +1429,6 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# }
|
||||
#
|
||||
# _apply_configuration() {
|
||||
#
|
||||
# window_active="$(tmux display -p '#{window_active}' 2>/dev/null || true)"
|
||||
# if [ -z "$window_active" ]; then
|
||||
# if ! command -v perl > /dev/null 2>&1; then
|
||||
|
@ -1483,8 +1443,8 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires awk" \; set -u display-time \; run "sleep 3" \; kill-server'
|
||||
# return
|
||||
# fi
|
||||
# if [ $_tmux_version -lt 230 ]; then
|
||||
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.3+" \; set -u display-time \; run "sleep 3" \; kill-server'
|
||||
# if [ $_tmux_version -lt 240 ]; then
|
||||
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.4+" \; set -u display-time \; run "sleep 3" \; kill-server'
|
||||
# return
|
||||
# fi
|
||||
# fi
|
||||
|
|
|
@ -5,16 +5,6 @@
|
|||
# Copyright 2012— Gregory Pakosz (@gpakosz).
|
||||
|
||||
|
||||
# -- navigation ----------------------------------------------------------------
|
||||
|
||||
# if you're running tmux within iTerm2
|
||||
# - and tmux is 1.9 or 1.9a
|
||||
# - and iTerm2 is configured to let option key act as +Esc
|
||||
# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys
|
||||
# then uncomment the following line to make Meta + arrow keys mapping work
|
||||
#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D"
|
||||
|
||||
|
||||
# -- windows & pane creation ---------------------------------------------------
|
||||
|
||||
# new window retains current path, possible values are:
|
||||
|
@ -44,7 +34,7 @@ tmux_conf_new_session_prompt=false
|
|||
|
||||
# -- display -------------------------------------------------------------------
|
||||
|
||||
# RGB 24-bit colour support (tmux >= 2.2), possible values are:
|
||||
# RGB 24-bit colour support, possible values are:
|
||||
# - true
|
||||
# - false
|
||||
# - auto (default)
|
||||
|
@ -96,7 +86,7 @@ tmux_conf_theme_colour_17="#e4e4e4" # white
|
|||
tmux_conf_theme_window_fg="default"
|
||||
tmux_conf_theme_window_bg="default"
|
||||
|
||||
# highlight focused pane (tmux >= 2.1), possible values are:
|
||||
# highlight focused pane, possible values are:
|
||||
# - true
|
||||
# - false (default)
|
||||
tmux_conf_theme_highlight_focused_pane=false
|
||||
|
|
|
@ -10,8 +10,7 @@ Installation
|
|||
|
||||
Requirements:
|
||||
|
||||
- tmux **`>= 2.3`** (soon `>= 2.4`) running inside Linux, Mac, OpenBSD, Cygwin
|
||||
or WSL
|
||||
- tmux **`>= 2.4`** running inside Linux, Mac, OpenBSD, Cygwin or WSL
|
||||
- awk, perl and sed
|
||||
- outside of tmux, `$TERM` must be set to `xterm-256color`
|
||||
|
||||
|
|
Loading…
Reference in a new issue