Skip to content

๐Ÿ’ป Windows x Ubuntu (WSL2) dotfiles managed with GNU Stow.

License

Notifications You must be signed in to change notification settings

daniellwdb/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

44 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Daniell's dotfiles

Visual Studio Code (WSL: Ubuntu 20.04)

Managed by GNU Stow.

GitHub license GitHub stars GitHub issues

About โ€ข Getting Started โ€ข Next Steps โ€ข Contributing โ€ข License

โ„น About

These are the dotfiles that I use when I set up a new enviroment using Windows and WSL2 with Ubuntu. The setup is mainly focused on Visual Studio Code being the primary text editor and for terminal tasks related to programming, for other tasks I am using Windows Terminal.

All user interfaces are themed after Nord, An arctic, north-bluish color palette.

๐Ÿš€ Getting Started

Font

I am using a modified version of Cascadia Code as my primary font for both Visual Studio Code and terminals.

WSL2

I am using Windows Subsystem for Linux with Ubuntu 20.04.

Docker Desktop

I am using Docker Desktop with WSL2 as backend, after installing I opened the options and made sure 2 things were checked:

  • General -> Use the WSL 2 based engine (Windows Home can only run the WSL 2 backend)
  • Resources -> WSL INTEGRATION -> Enable integration with my default WSL distro

Preparing

Clone the repository on Linux:

cd ~
git clone --recursive https://github.com/daniellwdb/dotfiles.git
cd dotfiles

Make zsh the default shell for Linux:

sudo apt install -y zsh
chsh -s $(which zsh)

Run the appropiate semi-interactive scripts in their own environments.

โš ๏ธ Only run these scripts if you understand what they do โš ๏ธ

See: install.ps1 and install.zsh

OS Environment Command
Windows Powershell (as Admin) \\wsl$\Ubuntu-20.04\home\your-username\dotfiles\install.ps1
Ubuntu Ubuntu shell ~/dotfiles/install.zsh

The setup process will do the following:

Windows:

  • Prompt to install Visual Studio Code extensions that I use.
  • Prompt to create a symlink for Visual Studio Code settings to manage them with Git.
  • Prompt to create a symlink for Windows Terminal settings to manage them with Git.
  • Prompt to create a symlink for WSL2 config to manage with Git.

Ubuntu:

  • Install common dependencies.
  • Prompt to install individual dotfiles managed with GNU Stow.
  • Prompt to install Visual Studio Code extensions that I use.

๐Ÿ‘Ÿ Next Steps

wsl

Make sure you change windows/.wslconfig to limit RAM usage based on your system specs, I set it to 8GB because I have 32GB of RAM.

nvm

I am using nvm to manage my Node.js versions

# Restart terminal after running the command below
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

# Installs latest Node.js version
nvm install node

Managing dot- and config files

Linux

If you have a config file or folder in your home directory, create a back up and delete it, then create a folder in the dotfiles repository with a name that's relevant to the config file or directory. Now run stow foldername and a symlink will be created from the repository to the home directory.

To update the list of Visual Studio Code extensions isolated in WSL, run the following in ~/dotfiles:

code --list-extensions | tail -n +2 > vscode/extensions.linux

Windows

  • Open install.ps1 and add a new line to make a call to the Make-Symlink function, the first argument is a path to the relevant file on Windows, the second one will be a path relative to the dotfiles repo.
  • Open install.zsh and find the line that contains [[ $dir =~ ^(vscode|windows)$ ]] && continue, add the folder you created for your Windows config file to this list of ignored directories.

To update the list of Visual Studio Code extensions installed on Windows, run the following in Powershell:

code --list-extensions | Out-File -FilePath \\wsl$\Ubuntu-20.04\home\your-username\dotfiles\vscode\extensions.windows

๐Ÿ’• Contributing

Feel free to open any kind of pull request!

Please note that most configuration files are tweaked to my personal preferences, if you wish to make changes to UI specific configurations, consider forking this repository instead.

๐Ÿ“‘ License

This project is licensed under the MIT License - see the LICENSE file for details.