Category: Workflow

Home Office Setup

In March of 2020, I finally started putting together my home office. I’ve been working from home since 2013, but for various reasons, I never put that much thought into a home office until the beginning of the COVID-19 pandemic.

A lot of this was purchased through a home office allowance that Automattic graciously provides. I’m lucky to work for a company that has always been fully distributed and understands the value of ensuring everyone has a good workspace. I know home office setups weren’t everyone’s top priority a year and a half ago.

Desk

The desk is an UPLIFT V2 with a 60″x30″ Rubberwood top. I previously had a much smaller desk with a manual crank. The manual crank was actually fine but I wanted something that was big enough for two monitors and a lamp, at least. The extra space helps it feel less cluttered, which is important for my ability to concentrate.

Desk Chair

The chair is a Herman Miller Mirra 2. I’ve had this one for over 8 years and it’s showing no signs of wearing out any time soon. I know this is a cliché, but if anything is worth spending extra money on, it’s a good chair. Your back will thank you.

Armchair

I love having a comfy armchair in my office. This was a March 2020 addition and I think it’s my favorite thing in here. (It’s definitely my dog’s favorite thing.) This is the IKEA STRANDMON. It’s the perfect place to meditate, catch up on some reading, or just find a slightly comfier place to work through a coding problem.

Displays

There are two monitors — an LG 27″ UltraFine 5K and a Dell U2417H.

The LG connects to my MacBook over USB-C, which also provides power. The Dell uses a DisplayPort to USB-C adapter. In an ideal world, I could daisy chain these monitors and just have one cable going to the MacBook. Unfortunately, the 5K version of the LG doesn’t support daisy-chaining. I added the Dell later on. It’s not high-DPI, so switching back and forth between the two displays can be a little jarring. In hindsight, I should have splurged for two 24″ 4K displays from the start.

Keyboard and Mouse

For input, I use the Apple Magic Mouse, Magic Keyboard, and Magic Trackpad combo. I had been using just the Magic Keyboard and Magic Trackpad for many years, but recently got the mouse as well. The consistency of having a Trackpad available regardless of whether I’m at my desk is nice, but I’m appreciating a mouse for the big screens. I know the Magic Mouse is a little controversial. I do a lot of navigating on the keyboard, so the ergonomics aren’t really a problem.

I’ve also tried the Keychron K2. It’s very fancy but just can’t get used to it. I really want to like it — every couple of months I take it out again. I think years of primarily using the MacBook keyboard make it easy to use the Apple keyboard compared to the slightly different layout of the K2.

Audio

Behind the desk is a shelf with Q Acoustics 3020i Bookshelf Speakers, a Sony STRDH190 Reciever, and a Fluance RT80 Record Player. I also have an old AirPort Express plugged into the receiver so I can stream music to the speakers over AirPlay. I have a small vinyl collection and I love listening to it while I work from time to time, but it isn’t exactly compatible with the blocks of uninterrupted time needed to solve complex programming problems.

I also have a pair of WordPress-branded Sony WH-1000XM4s that are great on a plane or when I need noise-canceling to help me concentrate.

Lighting

There’s a Philips Hue Beyond lamp on the desk and another lamp in the corner with a Hue bulb. I’ve used Hue lights throughout the house for many years. With HomeKit’s Adaptive Lighting feature, they start out warm in the morning, transition to cooler colors in the middle of the day, and go back to warm colors at night. I don’t know how much this does to help with concentration, but it sounds nice.

Miscelaneous

  • A plant from Wildewood, a local plant shop in Madison.
  • A PUGG wall clock from IKEA.
  • A fantasy football trophy.
  • Prints with Andrew McMahon lyrics.
  • A Martin LX1E (not pictured) for when I’m stuck on a problem and it’s too cold or wet to take a walk.

Current iPhone Home Screen

Looks quite a bit different than it did 8 years ago.

pb – MacOS CLI Trick

You can already interact with the system clipboard in MacOS directly from the command line with two commands: pbcopy and pbpaste. I’ve made it even easier for myself by detecting whether there is data in STDIN — for example if we’re sending data to the command via a pipe. If so, I’ve assumed we actually want to use pbpaste. Otherwise, we want to use pbcopy.

pb () { if [ -t 0 ]; then pbpaste else pbcopy fi }
Code language: JavaScript (javascript)

You can use it like pb < /path/to/file or pb > /path/to/other/file, for example.

New Hyper Key

For quite a while now, I’ve had Caps Lock mapped to Escape. At first it was just out of convenience — as a vim user, I use Escape much more than Caps Lock. With the new MacBook Pro keyboards it’s somewhat of a necessity.

I had a great, but complex, setup that I copied from Brett Terpstra where Caps Lock was Escape if you pressed it by itself, but Control + Option + Command + Shift if you held it down with another key. This worked great for global hotkeys, especially when combined with an app like Snap, because that complex combination of keys is uncommon anywhere else. When Sierra was introduced, the super glue and duct tape fell apart, and the global hotkeys stopped working.

It looks like this was recently fixed with Karabiner Elements though; and it’s much easier now. There are some pre-made rules on the author’s website. I copied the caps lock recipe to GitHub for posterity. After installing Karabiner Elements from Github, you can automatically install the caps lock rules with a specially crafted link:

karabiner://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/joshbetz/ef03e49e5d45ce34c8e23945260b122c/raw/54b65daa0377083b62a1c8219315457f087f18d8/caps_lock.json

https://gist.github.com/joshbetz/ef03e49e5d45ce34c8e23945260b122c

Writing Mode in Vim

I write quite a lot of Markdown on a daily or weekly basis. From meeting notes to documentation — most of the stuff I write for work that’s not code starts in Markdown. I used to use Byword, but it’s another app to switch between. After the last MacBook refresh, there were a few apps I installed immediately and it has pretty much stayed that way.

I’ve been using Vim to edit Markdown, which is fine, but was missing some things. So, I went hunting for the proper vimscript to enable things like soft line-wrapping and spell check. Needless to say, you can do more than that.

Goyo

One of the first things I found way Goyo. Goyo does “distraction-free writing in Vim” and does most of the work — disabling line numbers, vim-airline, soft-wrapping text at 80 characters, and centering it in the terminal window. You have to enable it with :Goyo after you open Vim, but I always want it enabled when I’m editing Markdown, so I wrote some vimscript:

" Goyo
function! s:auto_goyo()
    if &ft == 'markdown' && winnr('$') == 1
        Goyo 80
    elseif exists('#goyo')
        Goyo!
    endif
endfunction

function! s:goyo_leave()
    if winnr('$') < 2
        silent! :q
    endif
endfunction

augroup goyo_markdown
    autocmd!
    autocmd BufNewFile,BufRead * call s:auto_goyo()
    autocmd! User GoyoLeave nested call goyo_leave()
augroup END

vim-markdown

Next, I installed vim-markdown for syntax highlighting. Since most of my Markdown files have the .md extension, I need to tell Vim to treat them as Markdown.

autocmd BufNewFile,BufReadPost *.md set filetype=markdown

One of the vim-markdown features is to allow highlighting of other languages in code blocks:

let g:markdown_fenced_languages = ['javascript', 'go', 'php']

Spell Check

And, finally, I enabled spell checking in ~/.vim/ftplugin/markdown.vim with:

" Spell check
setlocal spell
highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline