Skip to content

Commit

Permalink
feat: refactor, improve all files/config (#169)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Many files are permanently removed or altered in ways
that are very different than the previous iteration.
  • Loading branch information
seantrane committed Nov 29, 2023
1 parent bb40dd8 commit 41cf37c
Show file tree
Hide file tree
Showing 199 changed files with 6,149 additions and 7,661 deletions.
67 changes: 60 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,20 @@ git clone https://github.com/seantrane/dotfiles.git dotfiles && cd dotfiles
~/.dotfiles/
├─ bin/ * Anything in `bin/` will get added to your `$PATH`
│ │ and be made available everywhere.
│ ├─ {binary} * Any shell script you wish
│ ├─ {binary} * Any shell script you wish.
│ :
├─ functions/ * Anything in `functions/` will get added to your `$PATH`
│ │ and be made available everywhere.
├─ functions/ * Anything in `functions/` will be loaded in environment.
│ ├─ {function} * Shell function (with filename identical to function name)
│ :
├─ {topic}/ * Directory with files pertaining to a specific topic or application.
│ ├─ aliases.zsh * Any file named `aliases.zsh` is loaded into your environment.
│ ├─ completion.zsh * Any file named `completion.zsh` is loaded last
│ ├─ aliases.{,ba,z}sh * Any file named `aliases.{,ba,z}sh` is loaded into your environment.
│ ├─ completion.{ba,z}sh * Any file named `completion.{ba,z}sh` is loaded last
│ │ and is expected to setup autocomplete.
│ ├─ path.zsh * Any file named `path.zsh` is loaded first
│ ├─ path.{,ba,z}sh * Any file named `path.{,ba,z}sh` is loaded first
│ │ and is expected to setup `$PATH` or similar.
│ ├─ *.zsh * Any files ending in `.zsh` get loaded into your environment.
│ ├─ *.{,ba,z}sh * Any files ending in `.{,ba,z}sh` get loaded into your environment.
│ ├─ *.symlink * Any files ending in `*.symlink` get symlinked into your `$HOME`.
│ : For example; `npmrc.symlink` would be symlinked to `~/.npmrc`
│ This is so you can keep all of those versioned in your dotfiles
Expand All @@ -84,6 +83,60 @@ git clone https://github.com/seantrane/dotfiles.git dotfiles && cd dotfiles
└─ cli * Command-line interface
```

## Dotfiles File Structure Explained

```text
~/
├─ .dotfiles/ * TBD
│ ├─ bash/ * TBD
│ ├─ bin/ * TBD
│ ├─ brew/ * TBD
│ ├─ functions/ * TBD
│ ├─ git/ * TBD
│ ├─ macos/ * TBD
│ ├─ script/ * TBD
│ ├─ shell/ * TBD
│ ├─ system/ * TBD
│ ├─ user/ * TBD
│ └─ zsh/ * TBD
└─ cli * TBD
```

## Zsh configuration process

1. **`/etc/zshenv`**
2. `~/.zshenv` 👉 `~/.dotfiles/zsh/zshenv.symlink` ⭐️
- `~/.zprofile` 👉 `~/.dotfiles/zsh/zprofile.symlink`
- _`~/.profile`_ 👀👤
- `~/.dotfiles/brew/paths.sh`
- `~/.env` 👉 `~/.dotfiles/system/env.symlink`
- `~/.dotfiles/shell/response.sh` ⭐️
- `~/.dotfiles/shell/paths.sh` ⭐️
- `~/.dotfiles/**/path.{sh,zsh}` ⭐️
- _`~/.path`_ 👀👤
- `~/.dotfiles/shell/exports.sh` ⭐️
- `~/.dotfiles/shell/functions.sh`
- _`~/.rvm/scripts/rvm`_
- _`~/.functions`_ 👀👤
- `~/.dotfiles/functions/*` ⭐️
3. **`/etc/zprofile`** 🛑
4. `~/.zprofile` 👉 `~/.dotfiles/zsh/zprofile.symlink` ⭐️
- _`~/.profile`_ 👀👤
5. **`/etc/zshrc`**
6. `~/.zshrc` 👉 `~/.dotfiles/zsh/zshrc.symlink` ⭐️
- _`~/.zprezto/init.zsh`_
- _`~/.localrc`_ 👀👤
- `~/.dotfiles/**/aliases.{sh,zsh}` ⭐️
- _`~/.aliases`_ 👀👤
- _`/etc/zsh_command_not_found`_
- `~/.dotfiles/**/completion.zsh` ⭐️
- _`~/z/z.sh` || `/opt/homebrew/etc/profile.d/z.sh`_
7. **`/etc/zlogin`**
8. `~/.zlogin` 👉 `~/.dotfiles/zsh/zlogin.symlink`
9. **`/etc/zlogout`**
10. `~/.zlogout` 👉 `~/.dotfiles/zsh/zlogout.symlink`

---

#### Happy coding!
170 changes: 141 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,34 @@ git clone https://github.com/seantrane/dotfiles.git ~/.dotfiles

### Step 2

Every file can be edited or removed as you please, but there are few primary files you'll want to focus on.
Every file can be edited or removed as you please, but there are few primary files you may want to focus on.

Edit the `zsh/zpreztorc.symlink`, for Prezto configuration.

Edit the `zsh/zshenv.symlink`, for Zsh configuration.

Edit the `osx/set-defaults.sh`, for your OS X preferences.
Edit the `macos/set-defaults.sh`, for your macOS preferences.

Edit the `osx/install-casks.sh`, for your preferred OS X apps.

Edit the `php/install.sh`, to modify PHP/extensions.
Edit the `system/Brewfile.symlink`, for your preferred software and macOS apps.

### Step 3

Bootstrap the `.dotfiles` and install dependencies.
To bootstrap the `.dotfiles` and install dependencies, run the following command.

```sh
~/.dotfiles/script/bootstrap
```

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

It will then install common dependencies, in the proper order.
This process will...

This will also install Zsh and Prezto and will reset your default shell.
1. Configure the `.gitconfig` file.
2. Symlink all `~/.dotfiles/*/*.symlink` files to the `$HOME` directory.
3. Install _Xcode Command Line Tools_ (macOS only), if unavailable.
4. Install _Homebrew_, if unavailable.
5. Install _Git_, if not installed with _Homebrew_.
6. Install _Ruby_, if not installed with _Homebrew_.
7. Install _Prezto_, _Zsh_, and _Zsh Completions_.
8. Reset default shell to Zsh.

### Step 4

Expand All @@ -81,7 +83,7 @@ After restarting your terminal/shell, run all installers.
```

This will not only install all of your [components](#components),
but it will also install your chosen apps/casks in `osx/install-casks.sh`.
but it will also install your chosen apps/casks in `macos/install-casks.sh`.

### Step 5

Expand All @@ -91,38 +93,148 @@ Restart your terminal/shell.

### Topical

Everything is built around topic areas. If you're adding a new area to your
Everything is built around _topic_ areas. If you're adding a new area to your
forked _dotfiles_ — say, "Java" — you can simply add a `java` 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`.
files in there.

### Components

There are 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`.
- **`bin/*`**: Anything in `bin/` will get added to your `$PATH` and be made available everywhere.
- **`functions/*`**: Anything in `functions/` will be sourced, auto-loaded into the shell environment.
- **`<topic>/*.sh`**: Any files ending in `.sh` get loaded into Bash and Zsh.
- **`<topic>/*.bash`**: Any files ending in `.bash` get loaded into Bash.
- **`<topic>/*.zsh`**: Any files ending in `.zsh` get loaded into Zsh.
- **`<topic>/path.{,ba,z}sh`**: Any file named `path.sh`, `path.zsh` or `path.bash` is loaded first and is expected to setup `$PATH` or similar.
- **`<topic>/completion.{ba,z}sh`**: Any file named `completion.zsh` or `completion.bash` is loaded last and is expected to setup autocomplete.
- **`<topic>/*.symlink`**: Any files ending in `*.symlink` get symlinked into the `$HOME` directory (without extension), enabling version control and auto-loading at the same time. These get symlinked in when you run `script/bootstrap` or `install_dotfiles`.

### Updates/Maintenance

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

---

## System Provisioning Features <a id="features"></a>

### Node.js global dependencies

- [x] [`cucumber`](https://www.npmjs.com/package/cucumber)
- [ ] [`ember-cli`](https://www.npmjs.com/package/ember-cli)
- [ ] [`gulp`](https://www.npmjs.com/package/gulp)
- [x] [`less`](https://www.npmjs.com/package/less)
- [x] [`serverless`](https://www.npmjs.com/package/serverless)
- [x] [`yo`](https://www.npmjs.com/package/yo)

### Ruby Gems

- [x] [`boom`](https://github.com/holman/boom)
- [x] [`jekyll`](https://jekyllrb.com)
- [x] [`rails`](https://rubyonrails.org)
- [x] [`sass`](https://sass-lang.com/)

### Visual Studio Code Extensions

_Some extensions are disabled (commented-out in code)._

- [x] [Angular Snippets](https://marketplace.visualstudio.com/items?itemName=johnpapa.Angular2)
- [x] [Apache Conf](https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-apache)
- [x] [Atom Keymap](https://marketplace.visualstudio.com/items?itemName=ms-vscode.atom-keybindings)
- [x] [Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag)
- [x] [Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag)
- [x] [AutoFileName](https://marketplace.visualstudio.com/items?itemName=JerryHong.autofilename)
- [x] [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account)
- [x] [BalanceD Syntax Theme](https://marketplace.visualstudio.com/items?itemName=seantrane.balanced-theme)
- [x] [BATS (Bash Automated Testing System)](https://marketplace.visualstudio.com/items?itemName=jetmartin.bats)
- [x] [Bash IDE](https://marketplace.visualstudio.com/items?itemName=mads-hartmann.bash-ide-vscode)
- [x] [Better Align](https://marketplace.visualstudio.com/items?itemName=chouzz.vscode-better-align)
- [x] [Bootstrap 4, Font awesome 4, Font Awesome 5 Free & Pro snippets](https://marketplace.visualstudio.com/items?itemName=thekalinga.bootstrap4-vscode)
- [x] [Brewfile](https://marketplace.visualstudio.com/items?itemName=sharat.vscode-brewfile)
- [ ] [Bridge to Kubernetes](https://marketplace.visualstudio.com/items?itemName=mindaro.mindaro)
- [x] [Change Case](https://marketplace.visualstudio.com/items?itemName=wmaurer.change-case)
- [x] [chmod](https://marketplace.visualstudio.com/items?itemName=dlech.chmod)
- [x] [Code Runner](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner)
- [x] [Contextual Duplicate](https://marketplace.visualstudio.com/items?itemName=lafe.contextualduplicate)
- [x] [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug)
- [x] [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
- [x] [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker)
- [x] [Document This](https://marketplace.visualstudio.com/items?itemName=oouo-diogo-perdigao.docthis)
- [x] [DotENV](https://marketplace.visualstudio.com/items?itemName=mikestead.dotenv)
- [x] [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)
- [x] [Elixir Support for VS Code](https://marketplace.visualstudio.com/items?itemName=mjmcloug.vscode-elixir)
- [ ] [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [x] [ExpressionEngine](https://marketplace.visualstudio.com/items?itemName=jrrdnx.expressionengine)
- [x] [Extension Pack for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack)
- [x] [File Downloader](https://marketplace.visualstudio.com/items?itemName=mindaro-dev.file-downloader)
- [x] [File Utils](https://marketplace.visualstudio.com/items?itemName=sleistner.vscode-fileutils)
- [x] [Git History](https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory)
- [x] [GitHub Codespaces](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces)
- [x] [gitignore](https://marketplace.visualstudio.com/items?itemName=codezombiech.gitignore)
- [ ] [Go](https://marketplace.visualstudio.com/items?itemName=golang.go)
- [x] [GraphQL for VSCode](https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode)
- [x] [HashiCorp Terraform](https://marketplace.visualstudio.com/items?itemName=hashicorp.terraform)
- [x] [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally)
- [x] [IntelliCode API Usage Examples](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.intellicode-api-usage-examples)
- [x] [IntelliCode](https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode)
- [x] [isort](https://marketplace.visualstudio.com/items?itemName=ms-python.isort)
- [x] [Jasmine code snippets](https://marketplace.visualstudio.com/items?itemName=xabikos.JasmineSnippets)
- [x] [JavaScript (ES6) code snippets](https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets)
- [x] [JavaScript Snippet Pack](https://marketplace.visualstudio.com/items?itemName=akamud.vscode-javascript-snippet-pack)
- [x] [Jekyll Syntax Support](https://marketplace.visualstudio.com/items?itemName=ginfuru.ginfuru-vscode-jekyll-syntax)
- [x] [Jest](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest)
- [ ] [Kubernetes](https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools)
- [x] [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)
- [x] [Lodash Snippets](https://marketplace.visualstudio.com/items?itemName=tomphilbin.lodash-snippets)
- [x] [Markdown Preview Enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced)
- [x] [Markdown Preview Github Styling](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles)
- [x] [Markdown Table Prettifier](https://marketplace.visualstudio.com/items?itemName=darkriszty.markdown-table-prettify)
- [x] [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint)
- [x] [Material Icon Theme](https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme)
- [x] [Maven for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven)
- [x] [Mocha Snippets](https://marketplace.visualstudio.com/items?itemName=Alan.MochaSnippets)
- [x] [New Relic CodeStream](https://marketplace.visualstudio.com/items?itemName=CodeStream.codestream)
- [x] [New Relic One](https://marketplace.visualstudio.com/items?itemName=new-relic.nr1)
- [x] [New Relic Query Language](https://marketplace.visualstudio.com/items?itemName=joelalejandro.nrql-language)
- [x] [npm Intellisense](https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense)
- [x] [Output Colorizer](https://marketplace.visualstudio.com/items?itemName=IBM.output-colorizer)
- [x] [Path Intellisense](https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense)
- [x] [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [x] [Project Manager for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-dependency)
- [x] [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
- [x] [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
- [x] [Rainbow CSV](https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv)
- [x] [RAML](https://marketplace.visualstudio.com/items?itemName=jeppeandersen.raml)
- [x] [React Native Tools](https://marketplace.visualstudio.com/items?itemName=msjsdiag.vscode-react-native)
- [x] [Regex Previewer](https://marketplace.visualstudio.com/items?itemName=chrmarti.regex)
- [x] [REST Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client)
- [x] [Rewrap](https://marketplace.visualstudio.com/items?itemName=stkb.rewrap)
- [x] [Ruby LSP](https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-lsp)
- [x] [Sass (.sass only)](https://marketplace.visualstudio.com/items?itemName=Syler.sass-indented)
- [x] [Select Line Status Bar](https://marketplace.visualstudio.com/items?itemName=tomoki1207.selectline-statusbar)
- [x] [Shell Snippets](https://marketplace.visualstudio.com/items?itemName=DeepInThought.vscode-shell-snippets)
- [x] [ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)
- [x] [slugify](https://marketplace.visualstudio.com/items?itemName=maximerouiller.slugify-vscode)
- [x] [Snippets and Syntax Highlight for Gherkin (Cucumber)](https://marketplace.visualstudio.com/items?itemName=stevejpurves.cucumber)
- [x] [SonarLint](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarlint-vscode)
- [x] [Sort JSON objects](https://marketplace.visualstudio.com/items?itemName=richie5um2.vscode-sort-json)
- [x] [Sort lines](https://marketplace.visualstudio.com/items?itemName=Tyriar.sort-lines)
- [x] [Terraform doc snippets](https://marketplace.visualstudio.com/items?itemName=run-at-scale.terraform-doc-snippets)
- [x] [Test Runner for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test)
- [x] [Vetur - Vue tooling for VS Code](https://marketplace.visualstudio.com/items?itemName=octref.vetur)
- [x] [VS Code database](https://marketplace.visualstudio.com/items?itemName=bajdzis.vscode-database)
- [x] [VS DocBlockr](https://marketplace.visualstudio.com/items?itemName=jeremyljackson.vs-docblock)
- [x] [VSCode Ruby](https://marketplace.visualstudio.com/items?itemName=wingrunr21.vscode-ruby)
- [x] [vscode-icons](https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons)
- [x] [XML Tools](https://marketplace.visualstudio.com/items?itemName=DotJoshJohnson.xml)
- [x] [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
- [x] [yo](https://marketplace.visualstudio.com/items?itemName=samverschueren.yo)

---

## Thanks <a id="thanks"></a>

Big thanks goes out to [Zach Holman](https://github.com/holman), whose [dotfiles](https://github.com/holman/dotfiles) were so awesome, I had to fork them. Zach forked his from [Ryan Bates](https://github.com/ryanb)' [dotfiles](https://github.com/ryanb/dotfiles). I am grateful for their efforts. Zach wrote [a post on the subject](http://zachholman.com/2010/08/dotfiles-are-meant-to-be-forked/) that I encourage reading.
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion bash/bash_env.symlink
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/usr/bin/env bash
# _ _
# | |__ __ _ ___| |__ ___ _ ____ __
# | '_ \ / _` / __| '_ \ / _ \ '_ \ \ / /
# | |_) | (_| \__ \ | | | | __/ | | \ V /
# |_.__/ \__,_|___/_| |_| \___|_| |_|\_/
# =========================================
#
# BASH ENV
# Bash Environment configuration file.
#
# Defines shell scripting environment (non-interactive shell).
#
Expand Down
Loading

0 comments on commit 41cf37c

Please sign in to comment.