This repository contains my personal configuration for my system. It is designed to work with a macOS system but it should be compatible with UNIX too (I used to have it on a Arch Linux machine before adapting it for my mac).
It contains configuration for mainly:
- brew
- zsh
- tmux
- vim
- alacritty
- bookmarker
- git
- OSX (macOS)
You can specify which packages and apps to install when you switch to a new system. It works with two files brew.txt
and cask.txt
(each line in the former will trigger a brew install ...
and each line in the latter will trigger a brew cask install ...
).
I use zsh as my shell. It comes with a bunch of plugins I find useful and some aliases I am used to use. The customization in terms of style is mainly done via ohmyzsh.
I like a very simple and short prompt.
Here's the shortest prompt you can get (from the home dir):
~ $
Here's instead the full prompt:
(venv) ~/dev/dir-a 127 a-very-looooooo...oooooong-branch+5 4s $
- virtual environment, if active between parenthesis, colored
- directory, colored
- return code, if != 0, colored
- git branch, length adjustable, shortened in the middle, colored
- dirty files counter, colored
- time that the previous command took, if greater than a customizable threshold, colored
- prompt char (I like the $ sign for it, you can change it to > if you want)
The configuration has been altered in style to make it sleek and flat, I added some keybindings and replaced the prefix from C-b
to C-a
because I care about my fingers. For the rest I tried to stick with the defaults (with some exceptions).
I configured it quite a bit, you can read the .vimrc
to read the customization.
I only saved a slight customization in terms of font size and chosen font. Unfortunately, alacritty does not support ligatures yet, so sometimes I use iTerm 2. When the ligature support will be added I plan to fully switch to it.
This is a special html page with a bit of javascript in it. It serves me to speed up the process of opening web pages I access frequently for which only one part of the URL is dynamic (think about JIRA issues for instance "https://jira.company.tld/browse/1002").
- Add a bookmark on your browser pointing to:
file:///Users/matt/dotfiles/bookmarker.html#https://jira.company.tld/browse/PROJECT-$
- link to
bookmarker.html
viafile://
protocol - add destination URL as an anchor
- in the destination URL, you can use
$
as a placeholder for the substitution
- link to
- Visit the page with the particular anchor
bookmarker.html
will prompt the variable part in a dialog- the variable part will be subsituted in the destination URL and you'll be redirected to it
I have defined some alias for recurring git commands, some of which are peculiar for me. I bet that some of them are also good for you though.
I like some specific settings to be set for my OS. This file helps me to set them all at once.
Once the repo is cloned, execute the deploy script:
./deploy
This script guides you through the following:
- Checks to see if you have zsh, tmux, and vim installed.
- Installs them using your default package manager if you don't have some of them installed.
- Checks to see if your default shell is zsh.
- Sets zsh to your default shell.
- Backs up your old configuration files.
Pretty convenient for configuring new servers.
Upon launching a new shell, zsh
first launches tmux. The session is retained even if the terminal crashes or if you force-quit it.
- please clone the repo and all its submodules
cat ~/dotfiles/brew.txt | xargs -n1 brew install
./dotfiles/.osx
- symlink the following
~/.zshrc
->~/dotfiles/zsh/.zshrc
~/.config/nvim/init.vim
->~/dotfiles/vim/init.vim
~/.tmux.conf
->~/dotfiles/.tmux.conf
~/.alacritty.yml
->~/dotfiles/.alacritty.yml
~/.gitconfig
->~/dotfiles/.gitconfig
touch ~/.jump
mkdir ~/notes
source <(curl -s https://raw.githubusercontent.com/mattmezza/pacco/master/pacco.sh)
pacco i pacco https://github.com/mattmezza/pacco.git 1.0.0
pacco I