Structuring Dotfiles Repo1:23
Everyone has their own way of setting things up, their own preferences, their own apps, their own aliases, and stuff like that. And you just want your own way of doing things. So the way I structured my .files is just a really simple and basic way of setting them up. I just have a few of them in my root directory. I have a README, which details everything on how to install them, how to get started with your own. I just have one aliases file, one team here that I'm using for my terminal, a path file for all my paths.
I just have one aliases file, one team here that I'm using for my terminal, a path file for all my paths. And we're going to look at each and every one of those files in a bit. I also wrote a very thorough blog post, which you can read, which will help you get started with .files. And it just details a lot about my own specific setup, the way, how you can get started with your .files, and all of the different bits and pieces that I found useful when creating my own. There's also a very nice website called .files.github.io. And it basically has a gigantic list of other people's .files.
Configuring Oh My Zsh4:47
As you can see, there's lots of plugins, lots of contributors, lots of teams. It has a really big community behind it. You can easily install it by just a simple command line. And it'll install a directory in your root directory, where it's just basically a git repo, which gets updated periodically and automatically. So you don't need to worry about that either. So let's take a look at my own ZSH settings. And I'm going to show you my .files repo, which I showed you earlier. And the starting point for OhMyZSH is basically the .zshrc file. It starts off with a lot of configuration, which you can use to customize OhMyZSH framework.
Adding Aliases and Paths8:47
I have added a lot of custom commands that I use, like the shrc command, which is a really funny one. So you can type shrc, and you can basically paste that in if you want. There's a lot of other different aliases for directories, for Laravel that I use, for php, Vagrant, Docker, and Git itself, a lot of Git commands as well. There's also the path .zsh. This basically contains some of the exports I use for loading in new binaries into my terminal. What I did here, for example, is I added an export that adds a path to the base path of your terminal, and it references the global composer directory.
What I did here, for example, is I added an export that adds a path to the base path of your terminal, and it references the global composer directory. So all the binaries that I use for composer globally get loaded in. I've also added the same one, but then for Node. So if I use global node aliases, they get loaded into my shell environment as well. I've also added some other directories, like the node_modules and vendor/bin directory for my project. What this basically does is that it adds the binaries that get loaded in through composer and node_modules just in my terminal. So I don't need to type in vendor/bin/phpunit, for example.
Exploring Zsh Plugins10:14
and node modules just in my terminal. So I don't need to type in vendor/bin/phpunit, for example. I can just type phpunit and it works. But like I said, the zsh directory file also features some plugins you can install. And OhMyZSH has lots of those. So let's take a quick look at those. As you can see here on the OhMyZSH wiki, there's a gigantic list of plugins which you can use. There's lots of things here, like the Git aliases that I use. There's even aliases for Laravel here, for NPM, you name it. There's something for everyone, basically, that you can use.
Installing Dev Toolchain15:19
Then I start off with installing my development environment. I install the latest version of php. And also because I need to use it sometimes, I also install php 7.2. I install MySQL, Nginx, Node, and Redis. Those are basically my basic toolchains that I use on my Mac. I then get started with installing all of the apps that I use. And it's just like one gigantic list of all of the apps I have installed on my computer. These are the ones that are registered with Homebrew themselves. I then get started with installing QuickLook. And QuickLook will basically allow me, when I'm trying to preview files in my Finder window,
Backing Up Mac Settings17:10
Because you see, when you're using Mac, you're probably using something like iCloud. But it won't save everything. It will only go as far as whatever the app supports itself. Tools like PhpStorm, for example, have lots of other settings that don't get synced through iCloud or something like your terminal settings or whatever it is that has different kind of configuration, which get lost when you lose your computer. And what I'm using for that is a tool called Mac App. And Mac App is OS and Linux specific. So what it does, it basically backs up from all of the apps you have installed, which it supports, and it backs up all of those settings of those apps in a folder, which
of settings. And it's basically a .macOS file, which contains settings for how you can actually set all of those settings I just named through your terminal. And it's like a really big list of things you can do. This file obviously contains my own preferences for things. But you can go to Matthias' .files repo and reference all of these other settings for your Mac. And when you run this file, it basically restores your Mac as it was before on your other computer. You'll need to maintain this file, of course, when you change settings yourself, you need to update it in this file as well.
