Skip to content

snovvcrash/dotfiles-windows

Repository files navigation

dotfiles-windows

Everything is being done under WSL console.

[Create]

Track WSL branch as a submodule:

# Adds "branch = wsl" to .gitmodules (same as "git config -f .gitmodules submodule.wsl.branch wsl")
/mnt/c/Users/snovvcrash/.dotfiles$ git submodule add https://github.com/snovvcrash/dotfiles-linux wsl

Deploy

PS > wsl

# Remount with custom options
~$ sudo bash -c 'cat << EOF > /etc/wsl.conf
[automount]
root = /mnt/
options = "metadata,umask=22,fmask=11"
EOF'

~$ exit
PS > wsl --shutdown
PS > wsl

# Update & Upgrade
~$ sudo apt update && sudo apt upgrade -y

# Install some stuff
~$ sudo apt install -y \
  curl                 \
  net-tools            \
  mlocate              \
  cmake                \
  g++

# Clone dotfiles
~$ WIN_DOTFILES_DIR="$(wslpath `cmd.exe /C "echo %USERPROFILE%" | tr -d "\r"`)/.dotfiles"
~$ git clone https://github.com/snovvcrash/dotfiles-windows "${WIN_DOTFILES_DIR}"
~$ ln -sv "${WIN_DOTFILES_DIR}/wsl" ~/.dotfiles

# Init dotfiles
/mnt/c/Users/snovvcrash/.dotfiles$ git submodule update --init --remote
/mnt/c/Users/snovvcrash/.dotfiles$ git submodule foreach "git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)"

# Configure bash (lightweight)
~$ cat ~/.dotfiles/bash/.bashrc >> ~/.bashrc
# Or install zsh
~$ curl -ksL https://github.com/snovvcrash/dotfiles-linux/raw/master/00-autoconfig/zsh.sh | bash

# Install tmux
~$ curl -ksL https://github.com/snovvcrash/dotfiles-linux/raw/master/00-autoconfig/tmux.sh | bash

# Install fzf
~$ curl -ksL https://github.com/snovvcrash/dotfiles-linux/raw/master/00-autoconfig/fzf.sh | bash

Push

/mnt/c/Users/snovvcrash/.dotfiles$ cd wsl
/mnt/c/Users/snovvcrash/.dotfiles/wsl$ git commit -am "Changes in wsl branch of dotfiles-linux"
/mnt/c/Users/snovvcrash/.dotfiles/wsl$ git push origin wsl
/mnt/c/Users/snovvcrash/.dotfiles/wsl$ cd ..
/mnt/c/Users/snovvcrash/.dotfiles$ git commit -am "Changes in master branch of dotfiles-windows"
/mnt/c/Users/snovvcrash/.dotfiles$ git push origin master

Pull

/mnt/c/Users/snovvcrash/.dotfiles$ git pull
/mnt/c/Users/snovvcrash/.dotfiles$ git submodule update --remote --merge

Useful Links

Terminals

Widgets

Personalization

Text Editors

Remote Clients

Other