Created
April 27, 2023 07:33
-
-
Save ciis0/c5cd99f5fd2f43d3494528871ee909ea to your computer and use it in GitHub Desktop.
psi -- WSLg IntelliJ with pageant agent forwarding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
#tmux_sess="$( { pgrep -f "tmux attach" || pgrep -f "tmux new"; } | head -n1)" | |
#if ! [[ "$tmux_sess" ]] | |
#then read -p "confirm no tmux" | |
#fi | |
#eval export $(cat /proc/$tmux_sess/environ | grep -z SSH_AUTH_SOCK | tr "\0" "\n") | |
psi_env=/tmp/psi.txt | |
if [[ ! -f $psi_env ]] | |
then read -p "confirm no psi env" | |
fi | |
export SSH_AUTH_SOCK=$(cat /tmp/psi.txt) | |
setxkbmap -layout de -variant nodeadkeys | |
export http_proxy=http://127.0.0.1:9000 https_proxy=$http_proxy no_proxy=localhost | |
cd $(dirname $BASH_SOURCE) | |
cd .local/opt/idea-IU* | |
set +e | |
exec ./bin/idea.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
powershell -executionpolicy unrestricted psi.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start-job -name foo -ScriptBlock { ssh -A localhost -p 2222 -l cschulz -- 'echo $SSH_AUTH_SOCK > /tmp/psi.txt; while sleep inf & wait; do :; done' } | |
wsl '$HOME/idea.sh' | |
stop-job -name foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment