-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: use LocalAppData
environment variable to get path to Windows Terminal
#13
Comments
Hi, Thanks. Your solution is definitely better for the reasons you specified. Do you happen to know offhand if |
Looks like it was available with WSL1 after an update (1803), but perhaps if someone hasn't updated Windows 10 since 2017, they won't have it? https://devblogs.microsoft.com/commandline/windows10v1803/#interoperability |
Sounds good, I'm ok with using your solution in that case. |
First of all, thanks for all the effort you've put into your dotfiles. I've been using them for a little while now. I'm actually in the process of cherry-picking your latest stuff when I noticed a line in your set-theme script, figured I'd offer a suggestion.
Why?
This avoids several assumptions about the user's environment, particularly the location of the user's profile folder as well as the the root path for accessing Windows filesystem from WSL (i.e.,
/
vs/mnt/
)How?
Windows has an environment variable called LocalAppData that you can use to get the current user's local application data path.
Terminal
Here's how you would do it in the terminal:
Explanation
Screenshot below illustrates what's going on
Python
I'm not very fluent in Python, which is why I didn't open a PR.
I think it would look something like this:
Anyway, just a suggestion. Have a good one. 👋🏼
The text was updated successfully, but these errors were encountered: