1
0
mirror of https://github.com/samoshkin/tmux-config.git synced 2026-01-17 23:38:01 +00:00

Configure keybinding and command to renew environment (SSH_AUTH_SOCK, DISPLAY) inside tmux session when attached back to existing session

This commit is contained in:
Alexey Samoshkin
2017-11-24 23:58:55 +02:00
parent 6377634a56
commit 5cc0e65df4
2 changed files with 25 additions and 6 deletions

View File

@@ -309,13 +309,20 @@ set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr "fg=$color_dark,bg=$color_secondary"
# =====================================
# === Renew environment ===
# =====================================
set -g update-environment \
"DISPLAY\
SSH_ASKPASS\
SSH_AUTH_SOCK\
SSH_AGENT_PID\
SSH_CONNECTION\
SSH_TTY\
WINDOWID\
XAUTHORITY"
# ============================
# === Hooks ===
# ============================
# Prompt to rename window right after it's created
set-hook -g after-new-window 'command-prompt -I "#{window_name}" "rename-window '%%'"'
bind '$' run "~/.tmux/renew_env.sh"
# ============================