diff --git a/i3/config b/i3/config index c41c244..a811d7e 100644 --- a/i3/config +++ b/i3/config @@ -249,7 +249,7 @@ assign [class="^jetbrains-.*$"] workspace number $ws4 # start a terminal assign [class="^st$"] workspace number $ws5 bindsym $mod+Control+5 workspace $ws5 ; exec exec st -t "Simple Terminal (Local)" -e $SHELL -ic 'go_tmux -x' -bindsym $mod+Control+Shift+5 workspace $ws5 ; exec exec st -t "Simple Terminal (Gubal)" -e $SHELL -ic 'exec ssh gubal' +bindsym $mod+Control+Shift+5 workspace $ws5 ; exec exec st -t "Simple Terminal (Gubal)" -e $SHELL -ic 'exec ssh tmux.gubal' bindsym $mod+Return workspace $ws5 ; exec exec st -t "Simple Terminal (Local)" -e $SHELL -ic 'go_tmux -x' # open a file manager diff --git a/ssh/config b/ssh/config index 6aa9700..cbc93c5 100644 --- a/ssh/config +++ b/ssh/config @@ -1,17 +1,22 @@ AddKeysToAgent yes VisualHostKey yes +Host git git.reya.zone gubal gubal.reya.zone *.gubal.reya.zone *.gubal + StrictHostKeyChecking yes + Port 38922 + Host gubal gubal.reya.zone *.gubal.reya.zone *.gubal + Hostname gubal.reya.zone + +Host tmux.gubal SendEnv TZ LANG LANGUAGE LC_* ForwardAgent yes - StrictHostKeyChecking yes - Hostname gubal.reya.zone - Port 38922 + ForwardX11 yes + ForwardX11Timeout 0 + ForwardX11Trusted no RemoteCommand zsh -ic 'go_tmux -x' RequestTTY yes Host git git.reya.zone User git - StrictHostKeyChecking yes Hostname git.reya.zone - Port 38922 diff --git a/ssh/rc b/ssh/rc index 443b7e0..010fcf4 100755 --- a/ssh/rc +++ b/ssh/rc @@ -8,3 +8,15 @@ if [ -n "$SSH_AUTH_SOCK" ]; then ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock fi + +# example sshrc file +if read proto cookie && [ -n "$DISPLAY" ]; then + if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then + # X11UseLocalhost=yes + echo add unix:`echo $DISPLAY | + cut -c11-` $proto $cookie + else + # X11UseLocalhost=no + echo add $DISPLAY $proto $cookie + fi | xauth -q - +fi