From e45a2810a68c856c65d7b8ccea7e62d29d1baf68 Mon Sep 17 00:00:00 2001 From: James Blair Date: Sun, 16 Jan 2022 10:58:09 +1300 Subject: [PATCH] Update bashrc so display only updates in wsl. --- .bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.bashrc b/.bashrc index 7bd6a95..077589f 100644 --- a/.bashrc +++ b/.bashrc @@ -45,8 +45,10 @@ if ! shopt -oq posix; then fi fi -# Configure display for vcxsrv -export DISPLAY=`grep -oP "(?<=nameserver ).+" /etc/resolv.conf`:0.0 +# Configure display for vcxsrv in wsl +if [ $(uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') ]; then + export DISPLAY=`grep -oP "(?<=nameserver ).+" /etc/resolv.conf`:0.0 +fi # Configure emacs location export EMACSLOADPATH=~/Downloads/humacs: @@ -97,8 +99,6 @@ else bwu; fi # Try connect to my default tmate socket if ! tmate -S /tmp/default.tmate attach; then - tmate -S /tmp/default.tmate.tmate new-session -s default -n default -d tmate -S /tmp/default.tmate.tmate attach - fi