summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2021-11-05 15:46:29 -0500
committerToby Vincent <tobyv13@gmail.com>2021-11-05 15:46:29 -0500
commita8dc1eff5b02e0e53012bebc39c8df5745274bc9 (patch)
treebdd6ee5ae3fa971dad0d38ec42fa468e82db5a12
parent7d9ee40dee9813ac305d3cb4f280d2f9623f21fd (diff)
fix: fixed issue with wt startup dir (again)
-rw-r--r--shell/wsl.sh6
-rw-r--r--wt.json3
-rw-r--r--zshrc4
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"
}
diff --git a/wt.json b/wt.json
index f243ed2..041ea1a 100644
--- a/wt.json
+++ b/wt.json
@@ -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",
diff --git a/zshrc b/zshrc
index da3ea4a..51de715 100644
--- a/zshrc
+++ b/zshrc
@@ -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