neurons firing from a keyboard

thoughts about devops, technology, and faster business from a random guy from dallas.

Sleep better with two simple shortcuts.

Reading Time: Approximately 4 minutes.
View this post on GitHub.


Control + ⌘ + Shift + G Home button triple-click.


Exposing ourselves to bright screens at night while checking our Facebook feed or reddit posts might not be as harmless as it seems. Tons of research, like this and this suggest that viewing things on bright screens right before bed makes our brains think that we’re in daylight longer than we actually are and, consequently, prevent us from falling asleep sooner than we should be. This combined with our early-start culture has been shown to lead to fatigue, decreased concentration and, in some folks, depression.

Additionally, other research has shown that prolonged exposure to artificial light (like those in most offices or our phones) can, over time, damage our eyes’ ability to adjust to incoming light and weaken their sensitivity to it.

I didn’t notice any of this until a Slashdot post introduced me to Flux several years ago. Before using this application, I was usually tired and sore (I rode my bike much more often back then) most of the time, but didn’t think much of it. I went out often back then, and most of the people I came across were just as or more tired than I was, so I thought I was fine.

I would have never thought that simply cutting blue light at night would have improved my sleeping patterns as much as they did. I was honestly surprised and, since then, intrigued about doing everything I could to improve my sleeping habits.

A few months after (happily) using Flux, I saw a developer on our floor who had the oddest setup I’ve seen up until then: a small, vertically-oriented monitor with a completely dark desktop with huge icons and a huge terminal font size. I didn’t ask him much about it, but given how exceptional he was at what he did, I naturally thought: I need to try this.

I wasn’t ready for what happened next. I had absolutely no idea that copying some developer’s setup would completely transform the way that I worked going forward.

Working on dark desktops like the one above (my current working setup) has helped me:

  • Focus better (white text on a dark background is much more readable),
  • Work longer without cutting into my sleep,
  • Utilize smaller real estate much more efficiently (my ideal monitor is a 19” widescreen), and
  • Realize just how few companies actually support this (Material Design, I’m looking at you!)

Be jealous of my sweet eye-saving setup.

If you’re interested in giving this a try, here are two shortcuts you can set up easily on your Mac and iPhone that’ll make it super easy to toggle between the two:

For Your Mac

  1. Hit the ⌘ and Space key together to open Spotlight, then type in “Keyboard Shortcuts” and press Enter

  2. On the left hand side, click on “Accessibility” to bring up the Accessibility shortcuts on the right side. Find the “Invert Colors” shortcut on the right side, then click on the checkbox to enable it . Afterwards, click twice on the greyed-out key sequence then hit the Control, Shift, ⌘ and G keys together to activate it.

After enabling it, you can easily switch between light and dark mode by hitting:

Control + Shift + ⌘ + G

Note that this will also invert photos and images. If that creeps you out, hit that key sequence again to go back to normal!

For Your iPhone or iPad

You can also enable dark mode on your iPhone! To do so:

  1. Unlock your iPhone, then tap on Settings to open your iPhone’s settings.

  2. Tap on “General,” then on “Accessibility”.

  3. Find the “Invert Colors” option, then tap on the toggle switch to enable it. Afterwards, scroll all the way down to “Accessibility Shortcut,” then tap on it and then on “Invert Colors” to enable the shortcut.

After doing this, you’ll be able to turn on dark mode by triple-clicking your home button!

I hope this helps you as much as it’s helped me!