~ v3
Hej đ welcome to computer.mads-hartmann.com. I use this little site to 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.
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. - Rainbow Indent Can sometime be quite nice - havenât fully decided if I love it or not. For now Iâm using it
- 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
keybindings.json
[
////////////////////////
// Coding
////////////////////////
// the default is mapped to â+. but I use that for Raycast.
{
"key": "ctrl+.",
"command": "editor.action.quickFix"
},
////////////////////////
// Terminal
////////////////////////
{
"key": "cmd+n",
"command": "workbench.action.terminal.new",
"when": "terminalFocus"
},
// This enables closing terminal tabs when using the build-in terminal in the panel.
// The !terminalEditorFocus ensure that it doesn't interfere with the default system
// binding for closing terminals that are shown in editor groups.
{
"key": "cmd+w",
"command": "workbench.action.terminal.kill",
"when": "terminalFocus && !terminalEditorFocus"
},
{
"key": "cmd+[Backquote]",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
{
"key": "ctrl+x 3",
"command": "workbench.action.terminal.split",
"when": "terminalFocus"
},
{
"key": "ctrl+x 2",
"command": "workbench.action.terminal.split",
"when": "terminalFocus"
},
////////////////////////
// Window Management
////////////////////////
// â+<number> has become the default way to navigate to tabs in macOS
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
"key": "cmd+2",
"command": "workbench.action.openEditorAtIndex2"
},
{
"key": "cmd+3",
"command": "workbench.action.openEditorAtIndex3"
},
{
"key": "cmd+4",
"command": "workbench.action.openEditorAtIndex4"
},
{
"key": "cmd+5",
"command": "workbench.action.openEditorAtIndex5"
},
// Matches macOS default better
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditorInGroup"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditorInGroup"
},
// Focus the terminal - there's a similar binding for when the terminal is in focus above
{
"key": "cmd+[Backquote]",
"command": "terminal.focus",
"when": "!terminalFocus"
},
// Emacs-like ways of managing editor groups (frames in Emacs-speak)
{
"key": "ctrl+x 2",
"command": "workbench.action.splitEditorDown",
"when": "!terminalFocus"
},
{
"key": "ctrl+x 3",
"command": "workbench.action.splitEditorRight",
"when": "!terminalFocus"
},
{
"key": "ctrl+x b",
"command": "workbench.action.quickOpenPreviousRecentlyUsedEditor"
},
{
"key": "ctrl+x o",
"command": "workbench.action.focusNextGroup"
},
{
"key": "ctrl+x 0",
"command": "workbench.action.closeEditorsInGroup"
},
{
"key": "ctrl+x 1",
"command": "workbench.action.closeEditorsInOtherGroups"
},
{
"key": "ctrl+x k",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "ctrl+x left",
"command": "workbench.action.focusLeftGroup"
},
{
"key": "ctrl+x right",
"command": "workbench.action.focusRightGroup"
},
{
"key": "ctrl+x up",
"command": "workbench.action.focusAboveGroup"
},
{
"key": "ctrl+x down",
"command": "workbench.action.focusBelowGroup"
},
]
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 | |||
^ |
Trigger Suggest | yes | |
â⧠|
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 |
Settings
settings.json
{
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnSave": true,
"workbench.activityBar.visible": true,
"workbench.colorTheme": "Noctis Minimus",
"workbench.startupEditor": "none",
"window.restoreWindows": "none",
"window.commandCenter": true,
"workbench.iconTheme": "material-icon-theme",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
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 convient when I know I want to write a word that I can never spell correctly in the first attempt. - ray.so Really easy way to create beautiful screenshots of code snippets.
[Experimental] Arc
6th of February 2024: Iâm trying out using Arc as my default browser for a bit. Some quick notes
- 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. Instead I just use the mouse or â+L + âsidebarâ
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.