My .dotfiles
I keep this repository in $HOME/dotfiles
and symlink the necessary config files from the repository into $HOME
e.g.
ln -s $HOME/dotfiles/bashrc .bashrcbashrcbash configuration filebrew.shhomebrew homebrew setup scriptBrewfilehomebrew bundle fileconfig.fishfish configuration filefunctions.ps1PowerShell functionsgitconfiggit configuration filegitignore_globalglobal gitignore filemacosScript for setting up a new mac by Mathias Bynensprofile.ps1PowerShell profile about_Profilessetup.ps1setup for windowssetup.shsetup for mactmux.conftmux configuration filevim.shvim plugins setup scriptvimrcvim vim configuration filewindows.ps1Script for setting up a new windows by jayharris
setupsetup script
-
Clone repo
cd $HOME git clone "https://github.com/avidit/dotfiles.git"
-
Run the setup script
cd $HOME/dotfiles ./setup.sh
cd $HOME\dotfiles .\setup.ps1
Or,
-
backup existing files and folders
mv "$HOME/$file" "$HOME/$file.bak" mv "$HOME/$folder" "$HOME/$folder.bak"
Rename-Item -Path "$HOME\$file" -NewName "$HOME\$file.bak" Rename-Item -Path "$HOME\$folder" -NewName "$HOME\$folder.bak"
-
run desired script(s)
sh "$HOME/dotfiles/brew.sh" -
create symlinks for required file(s) and folder(s)
ln -s "$HOME/dotfiles/bashrc" "$HOME/.bashrc" ln -s "$HOME/dotfiles/config.fish" "$HOME/.config/fish/config.fish"
New-Item -ItemType SymbolicLink -Path $PROFILE.CurrentUserAllHosts -Target "$HOME\dotfiles\profile.ps1"