Skip to content

apscandy/dotfiles

Repository files navigation

WSL Stow for ubuntu.

demo

For experts.

If you are an expert with the terminal and dot files, this is just a gnu stow setup. Simply install the software listed below in your favourite package manager.

eza bat git fzf gnumake lazydocker lazygit gh neovim tmux stow fastfetch zoxide jq ripgrep cloudflared libgcc

Once the software is installed, run stow on the package you want (you know the drill).

For beginners and intermediates.

Youtube tutorial

YouTube video

Mac and Linux users

since windows terminal is only for well.. windows, for other operating systems I recommend kitty, which can be installed with.

curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin

command can be found here.

I still recommend installing jet brains mono nerd font in steps 1.1. When you get to step 6.2.2 run

stow kitty

to apply the theme, font and settings.

Step 1: Setup windows terminal.

This step is for windows terminal users. If you have not installed windows terminal click here, you will need wsl2 set up so you will need that completely set up and running Ubuntu click here.

Step 1.1: Install font.

Once the windows terminal is installed and wsl2 is set up, we need to install jet brains mono nerd font from here. I have a link here on how to install fonts. I recommend after downloading and extracting, press ctrl + a then right click install.

Step 1.2: Install colour theme.

For this step I recommend having vscode installed and ready to go. I am personally using Catppuccin Mocha as its a nice dark pastel theme, but you can choose any theme you like. Catppuccin have in incredible README on how to install a theme (including their theme) to the windows terminal which can be found here.

Step 2: Zsh.

When setting up wsl2 Ubuntu, I would recommend running the following command to update and upgrade the packages:

sudo apt update -y && sudo apt upgrade -y

and run to get build tools for neovim, mason and tree-sitter.

sudo apt-get install build-essential 

Step 2.1: Installing zsh.

After you have updated the system, install zsh from the apt package manager with the following command:

sudo apt install zsh

Step 2.2: Installing oh-my-zsh.

Next, install oh-my-zsh which provides a framework for zsh to install plugins. This can be done through running:

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Oh-my-zsh will run a prompt. I recommend going though the prompt and pressing 'Y' when it asks you if you would like to make it the default shell. You can also find the install command here from oh-my-zsh's website.

Step 2.3: Zsh plugins to make life better int the terminal.

  1. zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

The command can be found here.

  1. zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

The command can be found here.

Step 3: A pretty prompt.

To make the terminal prompt aesthetically pleasing and performant install starship. Run this commend to install it:

curl -sS https://starship.rs/install.sh | sh

The command can be found here.

Step 4: A good package manager and packages.

Step 4.1: Installing nix package manager

sh <(curl -L https://nixos.org/nix/install) --daemon

Go through the prompt answering all the prompts, and when it says it will only work after a restart just close the terminal and reopen it. No restart necessary. Command can be found here

Step 4.2: Installing packages.

nix-env -iA nixpkgs.eza nixpkgs.bat nixpkgs.git nixpkgs.fzf nixpkgs.gnumake nixpkgs.lazydocker nixpkgs.lazygit nixpkgs.gh nixpkgs.neovim nixpkgs.tmux nixpkgs.stow nixpkgs.fastfetch nixpkgs.zoxide nixpkgs.jq nixpkgs.ripgrep nixpkgs.cloudflared nixpkgs.libgcc

Step 5: Installing Tmux Package Manager (TPM).

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

The command can be found here.

Step 6: Clone this repository and setup.

Step 6.1: Cloing the repository.

git clone https://github.com/apscandy/dotfiles.git .dotfiles

step 6.2: Setting the dotfiles.

Now we need to cd in the repository we just cloned with the command:

cd .dotfiles

Within this repository, we need to run a couple of commands.

  1. Remove the .zshrc file that was generated by oh-my-zsh with the following command:
rm ~/.zshrc
  1. Use stow to link the dotfiles by running the following commands:
stow zsh
stow starship 
stow git
stow bat
stow nvim
stow tmux
  1. Once all the commands are executed, we need to source our zshrc files with the following command:
source ~/.zshrc

Step 7 misc clean up/setup

bat cache --build

Start a tmux session and press crtl + space then capital I to install tmux configs, Then, open up nvim and let lazy install all plugins and packages.

Step 8 setting up working directories and ssh keys

First we need to make our ssh key with the following.

ssh-keygen -t ed25519 -f /home/$USER/.ssh/git_signing_key
ssh-keygen -t ed25519 -f /home/$USER/.ssh/git_authorization_key
ssh-keygen -t ed25519 -f /home/$USER/.ssh/network_key

After that we need to tell the global git config to use the key.

git config --global user.signingkey ~/.ssh/git_signing_key.pub

Finally setting up the working directory

mkdir -p ~/Notes/01-Projects
mkdir -p ~/Notes/02-Area
mkdir -p ~/Notes/03-Resources
mkdir -p ~/Notes/04-Archive
mkdir -p ~/Projects/Forks
mkdir -p ~/Projects/Work
mkdir -p ~/Projects/Playground
mkdir -p ~/Projects/Repos

so it should look like the following