Skip to content

Dotfiles for customizing my development environment

License

Notifications You must be signed in to change notification settings

Nitestack/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

~/.dotfiles 📂
Cross-Platform & Cross-Shell Dotfiles
Powered by a cross-platform CLI and chezmoi

Latest commit GitHub Repo stars Github Created At

FeaturesRequirementsGetting StartedDocumentationCreditsLicense

Universal command set and vibrant shell configurations for Zsh and PowerShell. Compatible with Windows, macOS, and (partially) Linux, these configurations are effortlessly managed using a cross-platform CLI customized specifically for the needs of this repository, alongside chezmoi for seamless synchronization.

Be sure to ⭐️ or fork this repo if you find it useful!

🚀 Features

The major features of this repository are:

  • CLI tailored to this repository with a native PowerShell and Bash version (cross-platform)
  • Neovim Configuration powered by LazyVim (cross-platform)
  • WezTerm Configuration (cross-platform)
  • Visual Studio Code Configuration (cross-platform)
  • Scripts:
    • Ensures installation of all dependencies listed in home/.chezmoidata, supporting various package managers across different operating systems: winget for Windows, brew for macOS, apt for Ubuntu, and pacman for Arch Linux. Additionally, supports language-specific package managers such as npm and cargo.
    • Sets up the Spaceship theme (UNIX).
    • Configures the default shell to be Zsh (Linux).
    • Sets up Mirrorlist backup (Arch Linux).
    • Ensures installation of brew (macOS).
    • Sets system preferences using defaults (macOS).

Some of the additional features are:

⚙️ Requirements

🏁 Getting Started

First you need to install the dotfiles CLI. Simply run the following command in your terminal:

Bash

wget -O ~/.local/bin/dotfiles https://raw.githubusercontent.com/Nitestack/dotfiles/HEAD/scripts/unix/dotfiles

We use wget here because it comes preinstalled with most Linux distros. But you can also use curl:

curl -o ~/.local/bin/dotfiles https://raw.githubusercontent.com/Nitestack/dotfiles/HEAD/scripts/unix/dotfiles

To make it executable, run:

chmod +x ~/.local/bin/dotfiles

⚠️ Make sure to add the ~/.local/bin directory to your $PATH variable or use another location. Use the following command to append ~/.local/bin to your $PATH variable in your Bash/Zsh config (~/.bashrc or ~/.zshrc).

echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc

Or manually add the following line to your Bash/Zsh config:

export PATH="$PATH:$HOME/.local/bin"

PowerShell Core

iwr https://raw.githubusercontent.com/Nitestack/dotfiles/HEAD/scripts/windows/dotfiles.ps1 -OutFile $env:USERPROFILE\.local\bin\dotfiles.ps1

⚠️ Make sure to add the $env:USERPROFILE\.local\bin directory to your PATH or use another location. Use the following command to append $env:USERPROFILE\.local\bin to your PATH in your PowerShell config ($PROFILE).

Add-Content -Path $PROFILE -Value "`r`n`$env:PATH += `";`$env:USERPROFILE\.local\bin`""

Or manually add the following line to your PowerShell config:

$env:PATH += ";$env:USERPROFILE\.local\bin"

Alternatively, you can use the following command to permanently add it to your PATH environment variable, if it's not already there (therefore you don't need to add it into your PowerShell config).

if (!([System.Environment]::GetEnvironmentVariable("PATH", "User").Split(";") -contains "$env:USERPROFILE\.local\bin")) { [System.Environment]::SetEnvironmentVariable("PATH", "$([System.Environment]::GetEnvironmentVariable('PATH', 'User'));$env:USERPROFILE\.local\bin", "User") }

Now you can run dotfiles download and dotfiles install to download and install the dotfiles. Run dotfiles -h to see the available commands.

💡 The -h flag works on Windows and UNIX!

📚 Documentation

CLI

The UNIX CLI version of dotfiles was created with Bashly. The Windows CLI version of dotfiles was created with native PowerShell.

Because PowerShell and Bash are so different from each other, the command flags will have minor differences.

The convention for UNIX-style CLI's is to use - for short flags and -- for long flags. It uses the kebab-case if it is a long flag. For example, dotfiles -h and dotfiles --help are the same command.

The convention for PowerShell is to use only -, but for short and long flags. It uses the PascalCase if it is a long flag. For example, dotfiles -h and dotfiles -Help or even Get-Help dotfiles are the same command.

💡 As you might have noticed, the -h flag works on both Windows and UNIX!

💡 The short flags (if any) also work on both Windows and UNIX!

Other than these conventions, the Bash version of dotfiles is equal to the Windows version. They come with the same commands and flags.

🙌 Credits

  • Folke Lemaitre - his popular Neovim configuration LazyVim
    • many of the plugins and their configurations are used
  • Felipe Santos - take a look at his dotfiles
    • parts of his README are used
    • the install scripts for Ubuntu are used, modified and extended
  • René-Marc Simard - take a look at his dotfiles
    • the top section of his README is used

📝 License

This project is licensed under the Apache-2.0 license.