1
0
Fork 0
mirror of synced 2024-11-17 23:15:35 -05:00

tmux_conf_preserve_stock_bindings, resolves #553

This commit is contained in:
Gregory Pakosz 2024-02-17 14:57:52 +01:00
parent ee922631b6
commit 69a0bedc36
2 changed files with 16 additions and 0 deletions

View file

@ -858,7 +858,13 @@ run 'cut -c3- "$TMUX_CONF" | sh -s _apply_configuration'
# _apply_bindings() {
# cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT
#
# tmux_conf_preserve_stock_bindings=${tmux_conf_preserve_stock_bindings:-false}
# tmux list-keys | grep -vF 'TMUX_CONF_LOCAL' | grep -E 'new-window|split(-|_)window|new-session|copy-selection|copy-pipe' > "$cfg"
# if _is_true "$tmux_conf_preserve_stock_bindings"; then
# probe_socket="$(dirname "$TMUX_SOCKET")/tmux-stock-bindings-$$"
# TMUX_SOCKET="$probe_socket" tmux -f /dev/null list-keys >> "$cfg"
# rm -f "%probe_socket"
# fi
#
# # tmux 3.0 doesn't include 02254d1e5c881be95fd2fc37b4c4209640b6b266 and the
# # output of list-keys can be truncated

View file

@ -5,6 +5,16 @@
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- bindings ------------------------------------------------------------------
# preserve tmux stock bindings,
# while adding bindings that don't conflict with these stock bindings
# /!\ this disables some of Oh my tmux! bindings described in README.md
# - true
# - false (default)
tmux_conf_preserve_stock_bindings=false
# -- session creation ----------------------------------------------------------
# prompt for session name when creating a new session, possible values are: