- https://docs.microsoft.com/en-us/windows/wsl/compare-versions
- https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq
- https://docs.microsoft.com/en-us/windows/wsl/install-win10
sudo apt update
- Needed to turn off the VPN so DNS would resolve /shrug
sudo apt upgrade
You should do this before you install Powerlevel10k, so that the configuration displays the correct fonts.
Follow the instructions here. It will tell you how to install fonts for VSCode & Microsoft Terminal. Download them, highlight, right click, install.
Open File → Preferences → Settings, enter terminal.integrated.fontFamily
in the search box and set the value to MesloLGS NF
.
Add this to your corresponding profile after you have installed the fonts.
"fontFace": "MesloLGS NF"
- Open Terminal
- Preferences
- Profiles (Pop)
- Change Custom Font to
MesloLGS NF Regular
# https://blog.nillsf.com/index.php/2020/02/17/setting-up-wsl2-windows-terminal-and-oh-my-zsh/
sudo apt install git zsh -y
# https://ohmyz.sh/#install
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Consider restarting/reopening a new shell
# https://github.com/romkatv/powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.
# Restart/reopen a new shell
# You should be presented with the Powerlevel10k Conifguration Wizard
# You may want to get
If you're following these on Unix on something like Pop! OS and you're using the Gnome Terminal, then you will need to also need to set the terminal to zsh.
- Open Terminal
- Preferences
- Profiles (Pop)
- Command Tab
- Check Run a custom Command instead of my shell set it to
zsh
- Make sure When command exists: is set to
Exit the terminal
- Make sure When command exists: is set to
code ~/.zshrc
# Add these to `~/.zshrc`, should have some examples commented out near the bottom
alias projects="cd ~/projects"
Protip: run
source ~/.zshrc
to reload the changes.
If you chose to have many icons, I often don't need to see the OS in the terminal, so I remove it.
- Open
~/.p10k.zsh
- Find the line with
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
- Comment out
os_icon
- https://asdf-vm.com/
- https://github.com/asdf-vm/asdf
- https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf
sudo apt install curl git
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0
code ~/.zshrc
# Add `asdf` to plugins section ie: `plugins=(git asdf)`
asdf plugin-add nodejs [email protected]:asdf-vm/asdf-nodejs.git
# https://github.com/asdf-vm/asdf-nodejs/issues/119
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
# List available versions
asdf list-all nodejs
# Remember even major versions are LTS and odd are not
asdf install nodejs 14.15.1
# Set global so that npm/npx works
asdf global nodejs 14.15.1
- https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
- https://github.com/settings/keys
- IDK why that guide never links to this???
- https://github.com/settings/ssh/new
# I tend to use no password if my system is already protected, and I use the same passwords anyways. Sloppy, but eh. 🤫
ssh-keygen -t ed25519 -C "[email protected]"
ssh-add ~/.ssh/id_ed25519
# https://stackoverflow.com/questions/18695934/unable-to-copy-ssh-id-rsa-pub
# Be patient
clip < ~/.ssh/id_ed25519.pub
# or just cat it and copy it
cat ~/.ssh/id_ed25519.pub
- https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/managing-commit-signature-verification
- https://github.com/settings/keys
# Note: Size must be at least 4096
# No passphrase to avoid annoying VS Code integration with secure commits
gpg --full-generate-key
# Grab the hash from `sec`
# ie: sec rsa4096/DEADBEEF1337 2020-11-28 [SC]
# You would copy: DEADBEEF1337
gpg --list-secret-keys --keyid-format LONG
gpg --armor --export DEADBEEF1337
# or slow clipboard method
gpg --armor --export DEADBEEF1337 | clip.exe
- https://stackoverflow.com/questions/30024353/how-to-use-visual-studio-code-as-default-editor-for-git
git config --global core.editor "code --wait"
Now you can use
git config --global -e
This will allow:
- To make commits with your name and email
- VSCode for Git Editor
- VSCode for Git Differencing & Merging
- Sign commits
Note: Change singing key with the hash from the GPG Generation step above.
- https://www.39digits.com/signed-git-commits-on-wsl2-using-visual-studio-code
- Didn't do the pinentry stuff since I did no password.
[user]
name = "Your Cool Name"
email = "[email protected]"
signingkey = "DEADBEEF1337"
[commit]
gpgsign = true
[tag]
gpgsign = true
[core]
editor = "code --wait"
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
"git.enableCommitSigning": true