A continouos working in progress of my workstation personal configurations.
See also a Linux screenshot.
I’m using Ansible to manage system dependencies and configuration orchestration.
You first need to install Homebrew by following the instructions from their official website.
# Install Xcode Command Line Tools
xcode-select --install
# Install git and ansible
brew install git ansible
# To install everything from scratch.
ansible-playbook \
--inventory ./ansible/hosts \
./ansible/macos.yml
See ansible/macos.yml for the full list tags.
# Before start, install the minimal dependencies.
sudo apt-get install git ansible --quiet --yes
# To install everything from scratch.
ansible-playbook \
--inventory ./ansible/hosts \
./ansible/linux.yml
# You can also filter or skip by tags.
ansible-playbook \
--inventory ./ansible/hosts \
--tags "emacs" \
--skip-tags "deps" \
./ansible/linux.yml
# To install in a Docker container, skip apps, gnome and keyboard tags.
ansible-playbook \
--inventory ./ansible/hosts \
--skip-tags "apps,gnome,keyboard" \
./ansible/linux.yml
See ansible/linux.yml for the full list tags.
docker build --tag dotfiles .
docker run -it \
--volume ~/dev/dotfiles/ansible:/home/tester/dev/dotfiles/ansible \
dotfiles
docker run dotfiles \
ansible-playbook \
--inventory ./ansible/hosts \
--skip-tags "apps,gnome,keyboard" \
./ansible/linux.yml
Unfortunately, a container has its limitations. It will only work for the Linux dotfiles. Moreover, it won’t cover software that depends on GUI like Emacs (outside the terminal) and GNOME.
- Launch iTerm.
- Open the preferences by typing
CMD-i
. - Go to the
Colors
tab. - Click on
Load Presets
. - Click on
Import
. - Select the
.itermcolors
file from theiterm
folder in this dotfiles.
For more iTerm themes see iterm2-color-schemes.
- Launch System Preferences.
- Go to
Keyboard
. - Click on
Modifier Keys...
. - Change
Caps Lock
to^ Control
.
Make sure to do the same for the external keyboard if you have one.
- Launch System Preferences.
- Go to
Keyboard
. - Click on
Input Sources
. - Change “Press 🌐 key to” to “Show Emoji & Symbols”
Add the installed OpenJDK to jEnv.
# This is an example. Check where the JDK was installed on your machine.
jenv add /opt/homebrew/opt/java/libexec/openjdk.jdk/Contents/Home/
Add a global version.
jenv global 20.0.1
- Launch System Preferences.
- Go to
Displays
. - Change
Resolution
toScaled
. - Change
More Space
.
To prevent external monitor flickering issues:
- Go to
Displays > Display Settings
. - Change the external monitor’s color profile to
Color LCD
. - Change the external monitor’s refresh rate to
60 Hz
. - Turn off
Auto Adjust Brightness
,True Tone
, andNight Shift
.
Generate a new SSH key (you can follow the GitHub’s official steps here).
- Copy the SSH key to the clipboard.
- Go to GitHub settings.
- Go to SSH and GPG keys.
- Click on
New SSH key
. - Paste the key and save.
For the GPG key, you can follow the GitHub’s official steps here.
Tell Git to automatically sign all commits.
# Set your signing key
git config --global user.signingkey <YOUR_GPG_KEY_ID>
# Tell Git to automatically sign all commits.
git config --global commit.gpgsign true
# Remove all links created in your home directory.
$DOTFILES_DIR/shell/clean.sh
My key bindings are defined using general.el within use-package scattered in
lisp/my-*
files. So, if you want to check them all do M-x
general-describe-keybindings
.
I normally have multiple projects open at the same time in Emacs and I like to have them separated by workspace. For that, I have been using eyebrowse with hydra.
Hit C-c + t
to see the menu.
I often share thoughts and ideas with other people in my daily basis. For that I like to export my Org notes to HTML and then PDF. Thus, I created a minimal stylesheet that mimics GitHub’s Markdown styles for the features I use most in Org. See org.css.
Add the snippet below to include the styles in a Org file.
#+OPTIONS: html-style:nil html-postamble:nil num:nil
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="__REPLACE_ME_WITH REAL_LINK__"/>
GitHub pages might be a good candidate.
See setup.org
and org.css
.:
To convert HTML to PDF I use wkhtmltopdf.
wkhtmltopdf SOURCE.html TARGET.pdf
I often have ghost processes started from within Emacs but never properly terminated blocking ports. The command below help me to kill a process by its port number.
kill -9 $(lsof -i tcp:3000 -t)