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.
-
Clone the repo into the ~/.dotfiles directory:
git clone git@github.com:kniziol/dotfiles.git ~/.dotfilesAttention. It's crucial to clone the repo into the
~/.dotfilesdirectory, which is referenced in the dotfiles configuration. -
Install the dotfiles:
cd ~/.dotfiles && ./install.sh
- Installation of
Homebrew - Installation of
Oh My Zsh - Backup of configuration files from the
$HOMEdirectory.zshrc.p10k.zsh
- Update of
Homebrewand all installed formulae - Installation of dependencies and applications - Homebrew Bundle
- Installation of applications from Mac App Store -
mastool - Set the macOS preferences
- Set shell aliases
- Uses the Powerlevel10k theme
- Locale-related preferences:
LC_ALL=en_US.UTF-8LANG=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
# ...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
# ...