Skip to content

sneha-afk/dotfiles

Repository files navigation

dotfiles

📁 structure

Category Details
Shells bash: dot-home/.profile -> dot-home/.bashrc
pwsh: windows/profile/Microsoft.PowerShell_profile.ps1
Editors Neovim: dot-config/nvim -> see its README.md
WSL Config: windows\.wslconfig
Environment: dot-home/.wsl_env
Terminal WezTerm
Fonts Geist Mono, Segoe UI Emoji (built-in), optional Symbols Nerd Font Mono

Other helpful files in dot-config -> .config and dot-home -> ~/*.

💻 my hardware
  • Laptop: ThinkPad X1 Carbon Gen 10 (2022)
    • Intel Core i7-1260P (12th Gen)
    • Intel Iris Xe Graphics
  • OS: Windows 11 Pro with WSL2 (Ubuntu)
  • Monitor: Dell U2723QE

⚙️ Setup

There are helper scripts in /scripts for all systems such as for installing programs.

⭐ Recommended: trovl for symlinks

Use trovl (my project :>) for simple, declarative symlink management across all platforms:

# Apply manifest: must be run from the root of this repo
# Can add --overwrite and/or --backup
trovl apply trovl-manifest.json

# Preview changes
trovl apply trovl-manifest.json --dry-run

Also see manual installation methods.

The manifest file (trovl-manifest.json) is located at the root of this repo.

Shell prompt customization

Set these before sourcing the prompt script in .bashrc/.zshrc/PowerShell profile:

Variable Default Description
_PROMPT_USE_CUSTOM true Use custom prompt
_PROMPT_SHOW_GIT_STATUS true Show git diff indicators (+ staged, * unstaged)
_PROMPT_USE_GIT_PROMPT_SCRIPT true (Bash only) Use git-prompt script vs basic status
_PROMPT_PREPEND "" Custom prefix text

Note: To prevent terminal lag, the prompt only reads the branch name from .git/HEAD by default. If _PROMPT_SHOW_GIT_STATUS is enabled, it performs the extra I/O required to show staged (+) or unstaged (*) indicators. Turn this off as needed.


🐧 Linux

sudo apt-get install git make curl tar
make trovl       # Installs trovl and applies manifest
make eget        # Installs binary tools (lazygit, tree-sitter, ripgrep, fd, nvim, etc.)
Symlinks: Using GNU Stow
make install-home    # Bootstrap home (~/*) symlinks
make install-config  # Bootstrap config (~/.config) symlinks
make zsh             # Bootstrap Zsh config
make delete          # Remove all symlinks
make dry-run         # Preview symlink changes without applying
Manual Symlinks
ln -sf "$(pwd)/dot-config/nvim" "$HOME/.config/nvim"
ln -sf "$(pwd)/dot-vim/.vimrc" "$HOME/.vimrc"
ln -sf "$(pwd)/dot-bash/.bashrc" "$HOME/.bashrc"

🪟 Windows

The bootstrap script goes through installing from winget, scoop, and symlinks (prompts if want to use trovl):

.\windows\bootstrap.ps1
# Arguments: -SkipScoop, -SkipWinget, -SkipSymlinks, -SkipMisc
Run with elevated permissions

If bootstrap fails, run in elevated PowerShell (auto-elevation within the script should handle this):

Start-Process wt -Verb RunAs -ArgumentList `
  "powershell -NoProfile -ExecutionPolicy Bypass -File `"$PWD\windows\bootstrap.ps1`""
Manual Symlinks
New-Item -ItemType SymbolicLink `
  -Path $PROFILE `
  -Target "$(Resolve-Path .\windows\Microsoft.PowerShell_profile.ps1)" `
  -Force

New-Item -ItemType SymbolicLink `
  -Path "$env:USERPROFILE\.wslconfig" `
  -Target "$(Resolve-Path .\windows\.wslconfig)" `
  -Force

New-Item -ItemType SymbolicLink `
  -Path "$HOME\_vimrc" `
  -Target "$(Resolve-Path .\dot-home\.vimrc)" `
  -Force

New-Item -ItemType SymbolicLink `
  -Path "$env:LOCALAPPDATA\nvim" `
  -Target "$(Resolve-Path .\dot-config\nvim)" `
  -Force

⚠️ On $PROFILE

The default $PROFILE path resolves inside OneDrive, which leads to:

  • Unwanted OneDrive pollution when modules or profile-related files are created
  • Reduced portability across machines
  • Ongoing background sync overhead for files that don't need it
Solution: relocate the PowerShell profile

Redirect $PROFILE to a local path under Documents\WindowsPowerShell (and the equivalent directory for pwsh).

A small utility script is used to redefine $PROFILE. This script is copied into the standard Documents directory and sourced automatically. As a result, only this single profile file remains in OneDrive, while the actual working profile lives locally.

Copy-Item -Path ".\windows\utils\fix_profile_path.ps1" `
          -Destination (Join-Path $env:OneDrive "Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1") `
          -Force

Do not attempt to change the registry entries related to OneDrive... been there done that.

About

time spent : yeah

Resources

Stars

Watchers

Forks

Contributors