https://github.com/drewhannay/dotfiles
Drew's dotfiles
https://github.com/drewhannay/dotfiles
bash dotfiles
Last synced: about 2 months ago
JSON representation
Drew's dotfiles
- Host: GitHub
- URL: https://github.com/drewhannay/dotfiles
- Owner: drewhannay
- License: mit
- Created: 2020-09-08T23:20:35.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T21:19:54.000Z (about 2 years ago)
- Last Synced: 2024-04-17T22:29:47.611Z (about 2 years ago)
- Topics: bash, dotfiles
- Language: Shell
- Homepage:
- Size: 62.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Drew's dotfiles
## Installation
**Warning:** If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you don’t want or need. Don’t blindly use my settings unless you know what that entails. Use at your own risk!
### Using Git and the install script
You can clone the repository wherever you want. The install script will pull in the latest version and copy the files to your home folder.
```bash
git clone git@github.com:drewhannay/dotfiles.git && cd dotfiles && source install.sh
```
To update, `cd` into your local `dotfiles` repository and then:
```bash
source install.sh
```
Alternatively, to update while avoiding the confirmation prompt:
```bash
set -- -f; source install.sh
```
### Specify the `$PATH`
If `~/.path` exists, it will be sourced along with the other files, before any feature testing (such as [detecting which version of `ls` is being used](https://github.com/drewhannay/blob/main/.aliases#L3-L10)) takes place.
Here’s an example `~/.path` file that adds `/usr/local/bin` to the `$PATH`:
```bash
export PATH="/usr/local/bin:$PATH"
```
### Add custom commands
If `~/.extra` exists, it will be sourced along with the other files. You can use this to add commands you don’t want to commit to a public repository.
My `~/.extra` looks something like this:
```bash
# Git credentials
# Not in the repository, to prevent people from accidentally committing under my name
GIT_AUTHOR_NAME="Drew Hannay"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="drew@example.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
```
You could also use `~/.extra` to override settings, functions and aliases from my dotfiles repository. It’s probably better to [fork this repository](https://github.com/drewhannay/dotfiles/fork) instead, though.
#### Credits
Inspired by (and many functions copied from) https://github.com/mathiasbynens/dotfiles