I like to automate my work and all everyday duties. That's why I decided to create this repo and dotfiles that allow me to work less, automate the installation of stuff needed for my work, and backup all my settings here :)
Read the blog post for more details.
- Oh My Zsh
- Powerlevel10k - theme for Oh My Zsh
- Homebrew
- Mackup
- mas
-
Clone the repo into the ~/.dotfiles directory:
git clone [email protected]:macsmister/dotfiles.git ~/.dotfiles
Attention. It's crucial to clone the repo into the
~/.dotfiles
directory, which is referenced in the dotfiles configuration. -
Install the dotfiles:
cd ~/.dotfiles && ./install.sh
-
Restore applications' settings:
mackup restore
Attention. You need to make a backup first by running
mackup backup
and sync with your cloud storage.
- Installation of
Homebrew
- Installation of
Oh My Zsh
- Backup of configuration files from the
$HOME
directory.zshrc
.p10k.zsh
.mackup/
.mackup.cfg
- Update of
Homebrew
and all installed formulae - Installation of dependencies and applications - Homebrew Bundle
- Installation of applications from Mac App Store -
mas
tool - Set the macOS preferences
- Set shell aliases
- Uses the Powerlevel10k theme
- Locale-related preferences:
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
- Enter the SSH key passphrase once and only when needed
- Support The Fuck utility
The Homebrew Bundle installs all the packages and applications. Also, from the Mac App Store.
Configuration of the Homebrew Bundle is stored in the Brewfile. See below part of the configuration:
# Taps
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
# ...
# Binaries
brew 'bash' # Latest Bash version
brew "bat"
# ...
# Apps
cask 'discord'
cask 'docker'
# ...
# Fonts
cask 'font-lato'
cask 'font-open-sans'
# ...
# Mac App Store
mas 'Amphetamine', id: 937984704
mas 'Bitwarden', id: 1352778147
# ...
Mackup is a tool for backing up applications' preferences. See how it works. I decided to store backup in iCloud and support all applications except for:
- Iterm2
- Mackup
- Powerlevel10k
- Oh My Zsh
I don't make backups of Iterm2
preferences because of the following issues:
Other than that, I rarely use Iterm2. I prefer Warp.
Mackup
, Powerlevel10k
, and Oh My Zsh
preferences are stored in the dotfiles repo, so I don't want to duplicate
that.
All aliases are defined in the aliases.zsh file. The idea was to not duplicate aliases introduced by
Oh My Zsh
and create really useful aliases.
See below part of all the aliases:
#
# Miscellaneous
#
alias o='open'
alias cpr='cp -r'
# ...
#
# Docker
#
alias dce='docker compose exec'
alias dcl='docker compose logs -f'
# ...
Stored in the .macos file. Not all preferences are helpful for me, so I enabled only some of them. I decided to keep all preferences - maybe I will use others too in the future. Thanks to Mathias Bynens - https://mths.be/macos 💪
See below part of all the preferences:
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# ...
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool false
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool false
# ...
# Sleep the display after 4 minutes
sudo pmset -a displaysleep 4
# ...