Skip to content

Commit

Permalink
Merge pull request holman#231 from caarlos0/docs
Browse files Browse the repository at this point in the history
splitted readme
  • Loading branch information
caarlos0 authored Jun 27, 2016
2 parents 9a69411 + 33231e3 commit 630cc32
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 118 deletions.
134 changes: 16 additions & 118 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,138 +10,36 @@
[ab]: https://img.shields.io/badge/powered%20by-antibody-blue.svg?style=flat-square
[tb]: https://img.shields.io/travis/caarlos0/dotfiles/master.svg?style=flat-square
[tp]: https://travis-ci.org/caarlos0/dotfiles
[scrn]: https://raw.githubusercontent.com/caarlos0/dotfiles/master/screenshot.png
[scrn]: /docs/screenshot.png

## dotfiles
## Installation

Your dotfiles are how you personalize your system. These are mine.
First, make sure you have all those things installed:

I was a little tired of having long alias files and everything strewn about
(which is extremely common on other dotfiles projects, too). That led to this
project being much more topic-centric. I realized I could split a lot of things
up into the main areas I used (Ruby, git, system libraries, and so on), so I
structured the project accordingly.
- `git`: to clone the repo
- `curl`: to download some stuff
- `tar`: to extract downloaded stuff
- `zsh`: to actually run the dotfiles
- `sudo`: some configs may need that

If you're interested in the philosophy behind why projects like these are
awesome, you might want to [read my post on the subject][post].

At first, this repo contained the homebrew installation and other stuff like
that. I realized it would be better to split that into another repo, so
this contains configuration only, and the other handles only software
installation. So, [machine](http://github.com/caarlos0/machine) was born.

[post]: http://carlosbecker.com/posts/dotfiles-are-meant-to-be-forked/

## topical

Everything's built around topic areas. If you're adding a new area to your
forked dotfiles — say, "Erlang" — you can simply add a `erlang` directory and
put files in there. Anything with an extension of `.zsh` will get automatically
included into your shell. Anything with an extension of `.symlink` will get
symlinked without extension into `$HOME` when you run `script/bootstrap`.

## what's inside

A lot of stuff. Seriously, a lot of stuff. Check them out in the file browser
above and see what components may mesh up with you. Fork it, remove what you
don't use, and build on what you do use.

## components

There's a few special files in the hierarchy.

- **bin/**: Anything in `bin/` will get added to your `$PATH` and be made
available everywhere.
- **topic/\*.zsh**: Any files ending in `.zsh` get loaded into your
environment.
- **topic/path.zsh**: Any file named `path.zsh` is loaded first and is
expected to setup `$PATH` or similar.
- **topic/completion.zsh**: Any file named `completion.zsh` is loaded
last and is expected to setup autocomplete.
- **topic/\*.symlink**: Any files ending in `*.symlink` get symlinked into
your `$HOME`. This is so you can keep all of those versioned in your dotfiles
but still keep those autoloaded files in your home directory. These get
symlinked in when you run `script/bootstrap`.
- **topic/install.sh**: Any file with this name and with exec permission, will
ran at bootstrap phase.

## plugins

This project uses the [pure][pure] prompt (which is awesome!) and some other
[zsh plugins](/antibody/bundles.txt). All of them managed by [Antibody][antibody],
a faster and simpler Antigen-like program written in Go.

[pure]: https://github.com/sindresorhus/pure
[antibody]: https://github.com/caarlos0/antibody

## install

Run this:
Then, run these steps:

```console
$ git clone https://github.com/caarlos0/dotfiles.git ~/.dotfiles
$ cd ~/.dotfiles
$ script/bootstrap
$ ./script/bootstrap
$ chsh -s $(which zsh)
```

This will symlink the appropriate files in `.dotfiles` to your home directory.
Everything is configured and tweaked within `~/.dotfiles`.

`dot_update` is a simple script that installs some dependencies, sets sane OS X
defaults, and so on. Tweak this script, and occasionally run `dot_update` from
time to time to keep your environment fresh and up-to-date. You can find
this script in `bin/`.

## compatibility

I try to keep it working in both Linux (no specific distro) and OS X,
mostly because I use OS X at home and Linux at work.
> All changed files will be backed up with a `.backup` suffix.
The CI also is also ran on Linux and OSX.
## Further help:

## personalization
- [Personalize your configs](/docs/PERSONALIZATION.md)
- [Understand how it works](/docs/PHILOSOPHY.md)
- [License](/LICENSE.md)

The `~/.localrc` file will be sourced if it exist, so, that's the place you
want to put all your custom aliases and stuff.

## bugs

I want this to work for everyone; that means when you clone it down it should
work for you even though you may not have `rbenv` installed, for example. That
said, I do use this as *my* dotfiles, so there's a good chance I may break
something if I forget to make a check for a dependency.

If you're brand-new to the project and run into any blockers, please
[open an issue](https://github.com/caarlos0/dotfiles/issues) on this repository
and I'd love to get it fixed for you!

## a note for iTunes users

Most people I know don't use iTunes, I surely don't, so, this script disables
it every time you run `dot_update`. If you don't want that to happen, run:

```console
$ echo 'KEEP_ITUNES=1' >> ~/.localrc
```

If your iTunes is already broken, you will also want to run:

```console
sudo mv /Applications/iTunes.app/Contents/MacOS/iTunesHelper.app{-disabled,}
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
```

For more info, check [issue #197](https://github.com/caarlos0/dotfiles/issues/197).

## contributing
## Contributing

Feel free to contribute. Pull requests will be automatically
checked/linted with [Shellcheck](https://github.com/koalaman/shellcheck).

## thanks

I forked [Holman's](http://github.com/holman) excellent
[dotfiles](http://github.com/holman/dotfiles) and tweaked it to fit my
taste. I have also copied one thing or another from other people, so,
thanks everyone!
35 changes: 35 additions & 0 deletions docs/PERSONALIZATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Personalization

> How to add custom configuration without messing the local repository
## For the shell itself

You can add anything you want (secret stuff, for example), to the `~/.localrc`
file.

## For git

You can just change the default `~/.gitconfig` file, since it includes the
dotfiles managed one.

## For psql

You can edit the `~/.psqlrc.local` file.

## iTunes

Most people I know don't use iTunes, so it is disabled by default.
If you don't want that to happen, run:

```console
$ echo 'KEEP_ITUNES=1' >> ~/.localrc
```

If your iTunes is already broken, you will also want to run:

```console
$ sudo mv /Applications/iTunes.app/Contents/MacOS/iTunesHelper.app{-disabled,}
$ launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
```

For more info, check [issue #197](https://github.com/caarlos0/dotfiles/issues/197).
86 changes: 86 additions & 0 deletions docs/PHILOSOPHY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# PHILOSOPHY

> Philosophycal stuff about this dotfiles structure, decisions, etc..
## Why?

I was a little tired of having long alias files and everything strewn about
(which is extremely common on other dotfiles projects, too). That led to this
project being much more topic-centric. I realized I could split a lot of things
up into the main areas I used (Ruby, git, system libraries, and so on), so I
structured the project accordingly.

You can also [read my post on the subject][http://carlosbecker.com/posts/dotfiles-are-meant-to-be-forked/].

## Decisions

### Do not install a lot of software

At first, this repo contained the homebrew installation and other stuff like
that. I realized it would be better to split that into another repo, so
this one would contain only the configs, and the other handles only software
installation.

With that in mind, [machine](http://github.com/caarlos0/machine) was born.

It's an Ansible recipe that can install a bunch of stuff, and you can comment
out what you don't want. Works on both Linux and OSX.

### Default `EDITOR` and `PROJECTS`

The default `EDITOR` right now is `code`, which is Microsoft's OpenSource
Visual Studio Code editor. You can change that by adding your custom
override to that variable in `~/.localrc`.

`PROJECTS` is default to `~/Code`. The shortcut to that folder in the shell
is `c`. You can override this default in `~/.localrc`.

### Lot's of editors

I use `vim` a lot, but I also use `code`, and used to use `atom` and
`sublime-text`. So, the configs for all these editors are provided, you can
use the one you like the most.

### topical

Everything's built around topic areas. If you're adding a new area to your
forked dotfiles — say, "Erlang" — you can simply add a `erlang` directory and
put files in there. Anything with an extension of `.zsh` will get automatically
included into your shell. Anything with an extension of `.symlink` will get
symlinked without extension into `$HOME` when you run `script/bootstrap`.

### Naming conventions

There's a few special files in the hierarchy:

- **bin/**: Anything in `bin/` will get added to your `$PATH` and be made
available everywhere.
- **topic/\*.zsh**: Any files ending in `.zsh` get loaded into your
environment.
- **topic/path.zsh**: Any file named `path.zsh` is loaded first and is
expected to setup `$PATH` or similar.
- **topic/completion.zsh**: Any file named `completion.zsh` is loaded
last and is expected to setup autocomplete.
- **topic/\*.symlink**: Any files ending in `*.symlink` get symlinked into
your `$HOME`. This is so you can keep all of those versioned in your dotfiles
but still keep those autoloaded files in your home directory. These get
symlinked in when you run `script/bootstrap`.
- **topic/install.sh**: Any file with this name and with exec permission, will
ran at `bootstrap` and `dot_update` phase, and are expected to install plugins,
and stuff like that.

### ZSH plugins

This project uses the [pure][pure] prompt (which is awesome!) and some other
[zsh plugins](/antibody/bundles.txt). All of them managed by [Antibody][antibody],
a faster and simpler Antigen-like program written in Go.

[pure]: https://github.com/sindresorhus/pure
[antibody]: https://github.com/caarlos0/antibody

### Compatibility

I try to keep it working in both Linux (no specific distro) and OS X,
mostly because I use OS X at home and Linux at work.

The CI also is also ran on Linux and OSX.
File renamed without changes

0 comments on commit 630cc32

Please sign in to comment.