From b27574b14f48194080b4f926e0ee50fb88d5cc80 Mon Sep 17 00:00:00 2001 From: har0ke Date: Sun, 19 Jan 2025 19:49:22 +0100 Subject: [PATCH] WSL2: Add "DISPLAY" variable to .zshrc --- .zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.zshrc b/.zshrc index 2c328a5..dde1991 100644 --- a/.zshrc +++ b/.zshrc @@ -105,4 +105,5 @@ source $ZSH/oh-my-zsh.sh if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then exec startx; fi +DISPLAY=$(ip route | awk '/^default/{print $3; exit}'):0 PATH="$HOME/.dotfiles/scripts:${PATH}"