This is where I jot down notes about my computer. How it’s configured, what applications I use, and how I use them. It contains a little guide for bootstrapping new computers but mostly this is for documenting how I use my computer; documenting things helps me think.
Gitpod
I do 99% of my development using Gitpod. I use the Dotfiles feeature to load my Gitpod specific dotfiles from mads-hartmann/gitpod-dotfiles.
Arc
I’m using Arc as my default browser
- I disabled the default keybinding of ⌘S to show/hide the sidebar. Turns out I still hit ⌘S quite a lot when using Notion which meant I ended up toggling the sidebar all the time.
CleanShot X
I use CleanShot X as a replacement for the macOS native Screenshot application. The annotation features and flows of CleanShot X are just superb ✨
Karabiner Elements
With my Keychron Q10 I needed a way to have arrow keys in the home-row
- I had to set the Virtual Keyboard to ISO manually
- ⇪ maps to ^ This is something I started doing back when I was a heavy Emacs users and now the muscle memory is stuck with me.
- ⌘^hjkl maps to ←↓↑→ so I can navigate from the home-row. I would have preferred to just use ^ but that would conflict with ^k which I use to delete lines; again, back from my Emacs days.
- Experimental: I'm using it to emulate the Emacs mark functionality. This allows me to hit ^SPC to set the mark and then use the arrow keys to select text.
Sleeve
I have a soft spot for single purpose macOS applications. Sleeve is a perfect example of this.
VSCode
Extensions
This list is not comprehensive at the moment. The extensions are alphabetically sorted.
- Bookmarks
Really useful way to navigate code. - GitHub Copilot
I mostly used this for “advanced code-completion”. I rarely use it for prompting or anything else, really. Maybe in 2024 that will change. - GitHub Theme
The GitHub Light and GitHub Dark are my favourite themes at the moment - Material Icon Theme
This has been my go-to icon theme for quite a while. - Center Editor Window This is just to be able to map ^l to re-center the editor window around the current line. I used this all the time when I used Emacs so it’s nice to be able to use it again.
Keybindings
This is the list of keyboard shortcuts I generally use. It’s a bit of a weird mixture of trying to use the VSCode defaults while also accepting that I have a lot of Emacs muscle memory that I might as well put to good use.
Keys | Command Title | Default - Reason | |
---|---|---|---|
Coding | |||
^<space> | Trigger Suggest | yes | |
⌘⇧<space> | Trigger Parameter Hints | yes | |
^. | Quick Fix… | no - the default is ⌘. but I used that for Raycast | |
^- | Go Back | yes | |
F2 | Rename Symbol | yes | |
F12 | Go to Definition | yes | |
⌥⌘K | Bookmarks: Toggle | yes | |
⌥⌘L | Bookmarks: Jump to Next | yes | |
⌥⌘J | Bookmarks: Jump to Previous | yes | |
⌘K ⌘I | Show or Focus Hover | yes | |
Terminal | |||
⌘N | Terminal: Create New Terminal | no - matches the macOS default better | |
⌘W | Terminal: Kill the Active Terminal Instance | no - matches the macOS default better | |
^X 2 | Terminal: Split Terminal | no - matches Emacs’ defaults | |
^X 3 | Terminal: Split Terminal | no - matches Emacs’ defaults | |
Window Management | |||
⌘0 | Focus Sidebar | yes | |
⌘1 | Open Editor at Index 1 - 9 | no - matches the macOS default better | |
⌘⌥T | View: Close Other Editors n Group | yes | |
^⇥ | View: Open Next Editor in Group | no - matches the macOS default better | |
^⇧⇥ | View: Move Editor into Previous Group | no - matches the macOS default better | |
^X B | View: Quick Open Previous Recently Used Editor | no - matches Emacs’ defaults | |
^X O | View: Focus Next Editor Group | no - matches Emacs’ defaults | |
^X ↑ | View: Focus Editor Group Above | no - a mixture of the VSCode and Emacs. | |
^X → | View: Focus Editor Group Right | no - a mixture of the VSCode and Emacs. | |
^X ↓ | View: Focus Editor Group Down | no - a mixture of the VSCode and Emacs. | |
^X ← | View: Focus Editor Group Left | no - a mixture of the VSCode and Emacs. | |
^X 0 | View: Close All Editors in Group | no - matches Emacs’ defaults | |
^X 1 | View: Close Editors in Other Groups | no - matches Emacs’ defaults | |
^X 2 | View: Split Editor Down | no - matches Emacs’ defaults | |
^X 3 | View: Split Editor Right | no - matches Emacs’ defaults | |
^X K | View: Close Editor | no - matches Emacs’ defaults | |
⌘< | Terminal: Focus Terminal | no - makes it easy to jump to the terminal | |
⌘< | View: Focus Active Editor Group | no - makes it easy to jump back to the editors from the terminal |
Raycast
I adore Raycast. I pay for the Pro plan which, amongst other things, gives me access to ChatGPT through Raycast. I use the AI Chat as my primary interface to ChatGPT.
Built-in Extensions
I use the following built-in extensions
- Search Emoji & Symbols
I use this all the time. I have this mapped to ^⌘Space so that it overwrites the default Emoji picker in macOS - Navigation
I primarily use the “Search Menu Items” command. It’s the best. Allows you to use Raycast to search through the menu items of whatever application you have focused at the time. I have it bound to “⌘.” - Window Management
I use this a ton for very basic window management. “Center” is mapped to ⌘⌥C, “Left Half” to ⌘⌥←, “Right Half” to ⌘⌥←, and Maximize ⌘⌥↵.
Raycast Store Extensions
I use the following extensions from the Raycast Store:
- Apple Reminders
I use the “My Reminders” command get a quick overview or modify the individual reminders and “Create Reminder” to quickly adding new reminders. - Screenshot
Really useful for taking screenshots directly to the Clipboard. That way I don’t litter my Desktop with screenshots. - Color Picker
Quickest and simplest way to grab the hex code of a pixel on your screen. - Spotify Player
Much nicer than the Spotify App. I have enabled “Close window on action”. - Word Search
I primarily use this for the “Spell a Word” command which allows me to attempt to spell a word and then pick the correct spelling. It’s connivent when I know I want to write a word that I can never spell correctly in the first attempt. - ray.soReally easy way to create beautiful screenshots of code snippets.
1Password
I use 1Password for all my personal passwords, credit cards, credentials, and so on. I Install it using the App Store.
Notion
I use Notion for quite a few different things. This site is generated from a Notion document. I use it as a simple database system for books, articles, records, how-to’s, projects, and so on. I use it as an easy way to write interconnected notes when learning new topics.
I use the Notion Desktop App as I find it marginally quicker than opening a tab in Safari.
Setting Up a New Mac
This was from the last time I configured a Mac from scratch. If I were to do it today I don’t think I’d use Nix as the “global” package manager but just rely on Homebrew instead; I haven’t really seen any benefit from using Nix for system-wide packages.
Setting up Nix
To install Nix I do need some basic development tools installed like git
, curl
and so on:
xcode-select --install
I install Nix using The Determinate Nix Installer
curl --proto '=https' --tlsv1.2 -sSf -L \ https://install.determinate.systems/nix \ | sh -s -- install
Shell
Don’t show the Last login
message for every new terminal session:
touch ~/.hushlogin
Install Starship
nix profile install nixpkgs#starship
Create a basic profile for ZSH (touch ~/.zshrc
) and add the following
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale" source <(/Users/mads/.nix-profile/bin/starship init zsh --print-full-init) autoload -Uz compinit && compinit
SSH
I use 1Password to manage my SSH keys (docs) and rely on their SSH agent (docs). For the agent to work the following is placed in ~/.ssh/config
:
Host * IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
To verify it works run the following
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ssh-add -l
Changelog
The current version is v3
- v3 - In this version I’ve extended the document to also include macOS application, SaaS services, and so on; everything that I do on my computer. I also switched to using Notion for writing the document and then have a bit of code that produces a static site for it.
- v2 - the major change from v1 is that I now do 99% of my development in Cloud Development Environments (CDE) which means that I install very few tools locally.
- v1 - the original computer.mads-hartmann.com
Logbook
Week 8, 2024
I’m giving Dash a try to see if having the official docs available for the tools I use means I’ll reach for them more often rather than just run ChatGPT or Google every time I need to look something up. I picked Dash because there’s a Raycast Extension for it.