-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.remote.conf
29 lines (23 loc) · 1.14 KB
/
.tmux.remote.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# show status bar at bottom for remote session,
# so it do not stack together with local session's one
set -g status-position bottom
# Set port of SSH remote tunnel, where tmux will pipe buffers to transfer on local machine for copy
# set -g @copy_backend_remote_tunnel_port 11988
# In remote mode we don't show "clock" and "battery status" widgets
set -g status-left "$wg_session"
set -g status-right "#{prefix_highlight} $wg_is_keys_off $wg_is_zoomed #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host | #{online_status}"
# first, unset update-environment[SSH_AUTH_SOCK] (idx 3), to prevent
# the client overriding the global value
set-option -g -u update-environment[3]
# And set the global value to our static symlink'd path:
set-environment -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
# Note that the above requires a `.ssh/rc` file containing:
# ```
# > cat ~/.ssh/rc
# #!/bin/bash
# if [ ! -S ~/.ssh/ssh_auth_sock ] && [ -S "$SSH_AUTH_SOCK" ]; then
# ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
# fi
# ```
# Notice that we don't want to modify the link if the socket is still
# alive. See https://werat.dev/blog/happy-ssh-agent-forwarding/