Skip to content

hatemjaber/dotfiles

Repository files navigation

dotfiles

Cross-platform Bash dotfiles for macOS and Linux.

Install

Preview first:

./bootstrap.sh --dry-run

Install:

./bootstrap.sh

Force replacement of existing targets only when you intend to overwrite them:

./bootstrap.sh --force

--force backs up existing targets before replacing them.

Model

Bootstrap uses the current OS automatically:

  • Darwin -> macOS
  • Linux -> Linux

You normally do not need to pass a platform flag.

The shell runtime is built from:

  1. shared shell files from shell/
  2. platform overlays from platform/macos/ or platform/linux/
  3. copied local/private files in your home directory
  4. prompt loaded last

Symlinked files

Stable shared files are symlinked into $HOME:

  • ~/.bashrc -> shell/bashrc
  • ~/.bash_profile -> shell/bash_profile
  • ~/.bash_prompt -> shell/bash_prompt
  • ~/.aliases -> shell/aliases
  • ~/.functions -> shell/functions
  • ~/.exports -> shell/exports
  • ~/.curlrc -> shell/curlrc
  • ~/.wgetrc -> shell/wgetrc
  • ~/.fonts -> .fonts

On macOS, bootstrap also symlinks:

  • ~/.hushlogin -> platform/macos/hushlogin
  • ~/.screenrc -> platform/macos/screenrc

If a target already exists, bootstrap skips it unless --force is used.

Copied local/private files

Machine-local files are copied only when missing:

  • ~/.path
  • ~/.extra
  • ~/.gitconfig

Sources are selected as follows:

  • ~/.path: platform-specific platform/<os>/path.sample, falling back to shell/path.sample
  • ~/.extra: shell/extra.sample
  • ~/.gitconfig: samples/gitconfig

These files are intentionally copied, not symlinked, so each machine can edit them locally.

Dangerous helpers

Destructive helpers are not loaded by default. They live in shell/dangerous.

Opt in by setting:

export DOTFILES_ENABLE_DANGEROUS=1

or by creating a private ~/.dotfiles_dangerous file.

Provisioning

Provisioning scripts are manual and are not run by bootstrap:

  • provisioning/macos/
  • provisioning/linux/

Review scripts before running them. Some require sudo or mutate system settings.

Host-specific examples

Machine-specific examples live under hosts/examples/, including netplan configs. Do not apply them blindly to another host.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages