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:
@@ -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"
|
||||
|
||||
|
||||
# ============================
|
||||
|
||||
Reference in New Issue
Block a user