How to Setup My Dotfiles
WSL(System Drive)
- Open
Turn Windows Features on or off - A dialog box will open, turn on
Virtual Machine PlatformandWindows Subsystem For Linuxand click Ok. - Restart your computer.
- Install wsl2kernel
- Restart your computer.
WSL(Other Drive)
-
Make a folder called
WSLin whichever directory you want. -
Make a another folder and name it to the name of distro that you want to install.
-
Go to this page and download whichever distro you want. You can also download any other WSL compatible distro than mentioned in this list if you want, all you need is the
.tar.gzfile to install a distro. -
Exract the contents of the downloaded file untill you see the
.tar.gz -
Move that
.tar.gzfile into the base of the distro folder that you created in theWSLdirectory. -
Run the Following command to install WSL on that drive.
wsl --import Name_For_Distro "/location/where/you/want/to/install/it" "path/to/.tar.gz/file" -
Run
wsl -d Name_For_Distroto start your WSL distro.
Arch WSL
If you are installing Arch linux on WSL then you need to do some additional setup before using it. You can follow the following steps.
- Now we need to setup a main user for the WSL distro. Run the following command.
EDITOR=vim visudo - Now uncomment the line
%wheel ALL=(ALL:ALL) NOPASSWD: ALL - Now run following command to add the user to wheel group that we just configured.
useradd -m -G wheel {user} - Now exit Arch from WSL using
exitcommand and enter again via the following command to start WSL with specific user.wsl -u {user} -d Name_For_Distro - Now lets setup keyring for Arch linux. Run
sudo pacman-key --initto initialise the keyring. - Run
sudo pacman-key --populateto append all the necesaary keys to the keyring and after that runsudo pacman -S archlinux-keyringto finsih the setup. It can take some while to install the keyring. - Now make sure to run
sudo pacman -Syyuto upgrade the whole system.
Now you can use Arch linux on WSL as you please.
Linux Shell
Before we do anything, we need to setup our shell.
Make sure you have git installed on your system.
- You can install zsh by running following command
When you are asked for the shell, just enter
/bin/zshsudo pacman -S zsh && \ chsh - Make sure to delete any previous
~/.zshrcfiles from your home directory. - You can install the needed packages by running the following commands
sudo pacman -S exa fd fzf stow starship curl unzip ripgrep python-virtualenvsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions - Now you need to clone my dotfiles repo into the home(~) directory of your linux system, cd into that directory and run the following command.
stow . - Now just run the following command to source everything that we just installed.
source ~/.zshrc
Yay
yay is an AUR helper for arch linux. It is pretty awesome and has the 2nd largest storage of latest packages after Nix.
To install it just the following command
git clone https://aur.archlinux.org/yay-bin && \
cd yay-bin && \
makepkg -siGet the best Arch Linux mirrors
- Make sure you have yay installed on your system
- Following command installs the rate-mirrors package
yay -S rate-mirrors-bin - Following command fetches the best servers according to your location and then writes them to
/etc/pacman.d/mirrorlistrate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist
Font
It’s always good to have a nice nerd font installed on your system. I use Jet Brains Mono Nerd Font custom patched by nerd font patcher.
- Install fontforge by using the following command
yay -S fontforge - Create a folder name
FontPatcheranywhere you like - Go into that folder and run the following command
curl -LO https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip && \ curl -LO https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/JetBrainsMono.zip - Now run the following the following command to extract these
mkdir -p JetBrains && \ unzip FontPatcher.zip && \ unzip -q JetBrainsMono.zip -d JetBrains - Now that we have all the files we need, just run the following command to patch the font
For the name of the font, I personally like to use
JetBrainsMonoNLNerdFontCompletefontforge -script font-patcher -c --name [name-that-you-want-for-font] ./JetBrains/JetBrainsMonoNLNerdFont-Regular.ttf - Now that we have the font ready, you can just run the following command to add it to your system’s fonts
sudo mkdir /usr/local/share/fonts && \ sudo mv [name-that-you-want-for-font] /usr/loacl/share/fonts
Window Manager Setup
You can follow this step according to the window manager that you have. My dotfiles are configured for Hyprland and i3WM
Hyprland
Make sure you have a
minimalinstallation of Arch linux with no other window manager installed
-
Install the dependencies
yay -S base-devel cmake ninja meson wayland wayland-protocols libx11 libxkbcommon libinput pixman vulkan-icd-loader -
Now according to your environment install and setup the needed drivers
Intel
yay -S mesa intel-ucode vulkan-intel libva-intel-driverVirtual Box
yay -S open-vm-tools xf86-video-vmware mesa virtualbox-guest-utilssudo systemctl enable vmtoolsd.service && \ sudo systemctl start vmtoolsd.service && \ sudo systemctl enable vmware-vmblock-fuse.service && \ sudo systemctl start vmware-vmblock-fuse.service && \ sudo systemctl enable vboxservice.service && \ sudo systemctl start vboxservice.serviceNvidia
You are on your own.
-
Install the audio drivers
yay -S pipewire pipewire-pulse pipewire-alsa wireplumber -
Install the required tools for a functional hyprland environment
yay -S wayland-utils xdg-desktop-portal-hyprland dunst polkit-gnome wl-clipboard wlroots xorg-xwayland hyprcursor hyprutils -
Now we are going to install Hyprland itself
wlroots to aquamarine recently but for me, aquamarine is not working properly and the hyprland version 0.41.2 is the latest release that uses wlroots instead of aquamarine
Hyprland moved from
-
If you are running a newer device
make lagacyrendererjust runmake allIf aquamarine is not working for you, then you can follow the next old-device guide and while building hyprland, instead of running
yay -S hyprland-git -
If you are running an old device then you need to build the hyprland from source using
legacryrendererbuild flagCURL -LO https://github.com/hyprwm/Hyprland/releases/download/v0.41.2/source-v0.41.2.tar.gztar -xvzf source-v0.41.2.tar.gzcd hyprland-source && \ make legacyrenderer && \ sudo cp ./build/Hyprland ./build/hyprctl/hyprctl /usr/bin && \ sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions
-
-
Now just run the following command to install my dotfiles related packages and applications
yay -S waybar rofi-wayland alacritty wlsunset hyprpaper inotify-tools fastfetch cmatrix nyancat -
You are all set, now you can just run the
Hyprlandcommand to start your Hyprland session and use theAlt+mkeybind to exit that session whenever you want.
i3WM
While installing Arch linux make sure to install
i3WMwindow manager along with it.
Just run the following command to install my dotfiles related packages and applications
yay -S rofi i3-gaps feh picom fastfetch cmatrix polybar alacritty redshift nyancatPowershell And Oh-My-Posh
After installing powershell from Microsoft Store, open its config by using following command.
notepad $PROFILE.CurrentUserCurrentHostNow inside that file add the following code from Microsoft.Powershell_Profile.ps1 to change the location of powershell config.
. $env:USERPROFILE\.config\powershell\user_profile.ps1Make sure that the current font in Windows Terminal is set to a Nerd Font in order to load all the icons and stuff. Now you can install the oh-my-posh using the following command.
winget install JanDeDobbeleer.OhMyPosh -s wingetNow you can refresh the Windows terminal config by either restarting it or running .$PROFILE command.
Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"C++ Full Package
yay -S gcc clang gdb cmakeMise version manager
mise is an amazing way to both install and manage various version of various dev package.
You should refer to mise documentation to properly understand how to use it
You can install mise using the following command
curl https://mise.run | sh && \source ~/.zshrcNow just run the following command to install all the development tools with their specific versions as defined in my dotfiles
mise installNow run the following commadn to install yarn and live-server
npm install -g yarn live-server tree-sitter-cliTmux
You can install tmux via the command below
yay -S tmuxThen you need the tmux plugin manager. You can install it using hte following command
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpmNow just go run tmux and press CTRl-s followed by SHIFT-i to install the needed tmux packages.
Rust
You can install rust using the following command
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shRun the below command to install various important cargo packages that come in handy.
cargo install sccache bacon cargo-info cargo-updateNeovim
Neovim is an amazing code editor. You can install it using the following command:-
You also need to install lazygit for lazygit.nvim plugin to work
yay -S neovim lazygit python-pylatexencNow you just need to run neovim and it will install everything automatically.
NOTE: It may take some time for it to install things so have some patience.