diff options
-rw-r--r-- | shell/wsl.sh | 6 | ||||
-rw-r--r-- | wt.json | 3 | ||||
-rw-r--r-- | zshrc | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/shell/wsl.sh b/shell/wsl.sh index 06e2d7e..7fe3368 100644 --- a/shell/wsl.sh +++ b/shell/wsl.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -WINHOME="$(wslpath "$(powershell.exe -NoProfile -c \$HOME)")" - +WINHOME="/mnt/c/Users/$USER" +[ "$PWD" = "$WINHOME" ] && cd # XDG Specs export XDG_DESKTOP_DIR="$WINHOME/Desktop" export XDG_DOCUMENTS_DIR="$WINHOME/Documents" @@ -52,7 +52,7 @@ wsl_cmd_proxy() { esac args+=" " done - + powershell.exe -NoProfile -c 'cd $HOME;' "$exe" "$cmd" "$args" } @@ -97,8 +97,7 @@ "guid": "{58ad8b0c-3ef8-5f4d-bc6f-13e4c00f2530}", "hidden": false, "name": "Debian", - "source": "Windows.Terminal.Wsl", - "startingDirectory": null + "source": "Windows.Terminal.Wsl" }, { "commandline": "ssh heimdall", @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -[ "$PWD" = '/mnt/c/Windows' ] && cd + if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" @@ -10,6 +10,7 @@ export DOTFILES="${HOME}/dotfiles" # Directory hashtable hash -d .=${HOME}/dotfiles +[ -n "${WSL_DISTRO_NAME+1}" ] && source $DOTFILES/zsh/wsl.zsh source $DOTFILES/shell/env.sh source $DOTFILES/zsh/plugins.zsh source $DOTFILES/zsh/setopt.zsh @@ -17,4 +18,3 @@ source $DOTFILES/zsh/prompt.zsh source $DOTFILES/zsh/aliases.zsh source $DOTFILES/zsh/completions.zsh source $DOTFILES/zsh/keybindings.zsh -[ -n "${WSL_DISTRO_NAME+1}" ] && source $DOTFILES/zsh/wsl.zsh |