Don't Escape Full Screen Mode in Safari

I went back to using Safari instead of Chrome as my standard browser on the Yosemite Public Beta to enjoy the awesome Handoff features. (And it still feels awkward to talk publicly about an upcoming Apple software release.)

Yosemite window controls

Yosemite window controls

Since I use most applications in fullscreen mode on my MacBook Pro, using Safari out of the box has one major drawback: It insists on leaving fullscreen mode when you hit the Escape key. Since sites like Squarespace use Escape as a shortcut to the admin login, YouTube and Vimeo use it to exit fullscreen mode of their video player, and so forth, I end up exiting Safari's fullscreen mode accidentally over and over again, which drives me bananas.

While Chrome apparently had the same default setting a while back, it's now doing the sane thing and uses just ⌘⌃F to enter and exit fullscreen mode. Safari has had its Escape trigger set since the early days of Lion and even apps like Secrets don't know anything about a secret preference either, not even in Yosemite.

Now, you could go ahead and brute-force disable the Escape key in Safari. But that'd defeat the purpose of still allowing Escape to work as a shortcut in the aforementioned places, which I'd rather avoid.

Remap Escape to ⌥Escape with a Keyboard Maestro macro

Remap Escape to ⌥Escape with a Keyboard Maestro macro

Instead, I'm using the power of Keyboard Maestro once again to remap Escape to ⌥Escape, which is wired internally in Safari to still trigger websites' escape key mappings while disabling the accidental triggering of the pesky "Exit Full Screen" functionality.

If you don't want to cobble the macro together by hand, it's available for download here.


Last One Out Turn Off the Music

With the holidays quickly behind us, you’ll likely start leaving your house again. Now, while some don’t like Sonos products for some reason, yours truly likes them tremendously, as voiced numerous times on this very blog.

If you’re anything like me, the first thing you do after you open your eyes is to throw a playlist or two onto your Sonos system, even before you start your morning routine. My playlists have a tendency of running long, though, and more often than not I find myself returning back home with the music still playing, because I was so busy remembering all the things I needed to take with me when I left that I didn’t remember to pause the music.

Given the current availability of location-aware automation tools, I thought it shouldn’t be too hard to find a solution for this that didn’t involve a daily reminder in iOS.

iOS Reminder

iOS Reminder

Turns out, Sonos refuses to cooperate with services like IFTTT, which would make this a breeze to implement. Bummer. (It also looks like the Sonos Controller for Mac isn’t AppleScriptable. A bummer as well.)

I did, however, find a Ruby implementation of what you could call a “Sonos API”, which is based on UPnP (Universal Plug and Play). With this little gem and a little spit and glue we can still make this work.

What we need

The solution comes down to three ingredients:

  1. The IFTTT iOS App to trigger the actual location change
  2. The aforementioned sonos gem to interface with the Sonos speakers
  3. A (powered on) Mac with Hazel, that watches a folder in Dropbox

Let me walk you through it.


The IFTTT App has a special channel called iOS Location, which can trigger either when you’re entering or leaving a certain location or area.

For the Action, we’re simply creating a file in Dropbox. By default, IFTTT will put this into the IFTTT/iOS Location folder. It’s up to you where you put it, simply remember the file’s location for the Hazel setup a few paragraphs down.

The contents of the file don’t matter, either, although we’ll look at a way to make use of the file contents in the bonus section below.

What is important is the filename. Quick tip: when you initially set up the rule in the iOS App, you have to go back in and edit it in order to be able to set the filename. I’m using sonos_pause in my example, as you can see below.

The IFTTT action

The IFTTT action

(Now, while I could share the ready-to-consume action directly over IFTTT with you, there’s little point in stopping your Sonos system when you’re leaving my house, I guess.)

Sonos Rubygem

Since the Sonos Controller for Mac doesn’t have an AppleScript dictionary, as mentioned above, we need to resort to other means in order to be able to control the Sonos speakers from afar.

To install the sonos Rubygem, execute the following commands in the Terminal:

$ sudo gem install sonos

(You may have to provide your user's password at this point.)

Sidenote: The latest released version of the Gem has an issue properly detecting stereo pairs and surround/subwoofer setups. I sent a pull-request to fix this. Until that is merged, you can download a patched version of the Gem if you have a stereo pair or a SUB in your environment.

Hazel Rules

In Hazel, add the IFTTT/iOS Location folder as a folder to apply rules to.

For the conditions, all we care about is the fact that the file needs to be called sonos_pause. When such a file is matched, we execute an embedded shell-script, which is quite simple indeed.

(The only reason for the source command is my rbenv environment. You can probably leave it out if you use the stock OS X Ruby setup.)

When the script is done, we move the file to the trash, so that the rule isn’t triggered over and over again.

The Hazel Action to pause Sonos playback

The Hazel Action to pause Sonos playback

And that’s it! Now, when you leave the geofence you set up in the IFTTT iOS app, a file will be created in you Dropbox, synced to your Mac, where it’s picked up by Hazel to execute the script to pause Sonos playback.

Easy, huh? (Yeah, I know.)

Bonus: Start playback when you get home

Of course, the pause action is easily reversed with a play action.

In IFTTT, set up another recipe to trigger when you enter an area, create a different file in Dropbox (I suggest sonos_play), and add a new Hazel rule to watch for that filename.

Starting to play in a multi-room Sonos setup could be unpredictable, though. For one, you wouldn’t want all rooms to play. And also, the volume could be set to a devastating value, as you could’ve been blasting Gary Clark Jr. before you left the house.

For those reasons, we’ll whip up a script that’s a little more sophisticated. It will purposefully set the volume to a value of 10 before starting playback. And it will take the name of the room to start playing in from the textfile.

Just make sure that you put the exact name of the room to play into your IFTTT Recipe.

The Hazel Action to play Sonos in a specific room

The Hazel Action to play Sonos in a specific room

Assuming you have a Sonos setup in the office, this could totally be used for an office prank. If you set up an corresponding Hazel rule, you could, for example, play the intro music to “The Office” when you get into the office. Then again, maybe not.

Future optimisation: Multiple users?

What if you have multiple rooms and multiple Sonos users, meaning that you don't want to pause while there's still somebody at home or at the office? I don’t have a ready-to-share solution for this scenario, but here’s an idea: If everyone is equipped with the IFTTT iOS App, you could track (using the “Append to file” action, maybe) who entered the geofence and only pause Sonos after the last one has left the house again.

Can you come up with any other creative uses for IFTTT with Sonos? Shoot me an email.

2013 – A Disappointment?

Originally spurred by Christopher Mims' essay for Quartz, John Gruber reviewed 2013 in the context of Apple and Technology at Large:

Was 2013 a seminal or particularly extraordinary year for technology? No, I’d say not. But it certainly wasn’t a “lost year”, by any measure.

He walks us through the rather incremental evolution in technology that came to market in 2013 that, when compared to the original products they incrementally improved upon, provide a rather stark revolution in just a few years. One of the most prominent examples would be the original iPhone released in 2007 compared to this year's iPhone 5S, which is, claims Apple, 40x faster than the original.

Gruber closes his piece with:

There’s a nihilistic streak in tech journalism that I just don’t see in other fields. Sports, movies, cars, wristwatches, cameras, food — writers who cover these fields tend to celebrate, to relish, the best their fields have to offer. Technology, on the other hand, seems to attract enthusiasts with no actual enthusiasm.

Wise words, indeed.

But, seriously, have any of those fields that are blessed with more enthusiastic writers seen any revolutions in 2013?

Let's find out.


While I'm not a fan of any sports that could be considered mainstream like soccer, baseball, or American football, none of these seem to have gained anything revolutionary in quite some time by my research. In soccer, FIFA announced the controversial roll-out of Goal-line technology to additional tournaments, but that's pretty much about it. And besides, does an improvement in rule-keeping really count as any kind of revolution?

A sport that is dearer to my own heart since 2013 would be CrossFit, which gained a lot of traction and popularity recently. But CrossFit, Inc., the company, has been around since the year 2000 and even the CrossFit Games have been held since 2007. So, they’ve been around a while as well.

Performance analysis and data-analytics seem to have picked up significantly in recent years, but it's debatable if this is an innovation to be attributed to sports, rather than, say, technology.


3D Movies have been pushed heavily for years now and 2013 was no different. But from an innovation-standpoint, nothing seems to have revolutionized movies. Theaters were dwarfed with Hobbits, the Hunger Games, and Thor, among others, this year, which are all splendid movies in and of itself, but they didn't particularly revolutionize.

If anything, the wide-spread availability of tools like GoPro cameras and even the iPhone 5S with its 120FPS slow-motion shooting capability has promise to open up movie making to more people than ever. But let's not get ahead of ourselves.


I've relentlessly watched Top Gear season 19 this year. I've been to the Frankfurt Motor Show in Frankfurt, too. Yes, there were more electric cars than I had assumed there would be. But Tesla has been shipping its Roadster since 2008. The other car news at the show revolved around everyone and his dog building Audi R8 look-a-likes, rendering calendar year 2013 as definitively a year of evolution on the car design and development front.

Google's driverless cars, which have been road-legal since 2012, have completed a proclaimed accident-free half million kilometers. It’s a great accomplishment, but it’s simply building on what they’ve already been doing.

Could Uber, who are disintermediating car-for-hire transactions everywhere, then be the innovation of the year 2013? Not really. The San Francisco-based startup had its inception in 2009 and rolled out a lot of its fleet in 2012 already.


No, Apple hasn't released anything to put on your wrist this year.

People are still buying watches like jewelry, with technology like the tourbillon in them that is more than two centuries old. Companies like Patek Philipe make a billion dollars of revenue a year by selling watches that cost $21,000 on average, putting them in the 8th spot of the biggest watch makers of the world with a marketshare of a stunning 3%. (That does sound familiar, doesn't it?)

And we'll just pretend Samsung's awkward Galaxy Gear ad has never happened.


My photography has severely suffered in 2013. But that wasn't due to the lack of newly available camera gear. The current crop of professional D-SLR bodies from Nikon and Canon are nothing short of outrageously well-built, photo-construction machines.

And take the new kids on the block, like Fuji's X Series of mirror-less cameras (I own an X-E1, released in late 2012) or Sony's new A7, a full-frame mirror-less camera body with interchangeable lenses, which is something that we hadn't seen in such a compact format before.

However, the real photography revolution of the century was the transformation from film to digital several years back. First with bulky D-SLR bodies, now with these incremental steps to achieve great image quality with a minimal amount of gear, accessible to as many consumers as possible.

Sure, comparing the images coming out of the A7 to the images of the first compact cameras in the early 2000s feels like a drag race between a Dacia Logan and a Mercedes SLS. But year-over-year, camera makers have taken very conservative, incremental steps on the pixel ladder, improving resolution and image quality.

As well, if you had a time-machine and showed the images (and movies) created by the camera in this year's iPhone 5S (a telephone, for crying out loud) to someone a mere 10 years ago, you'd be accused of witchcraft. (Again, it must be noted that most of the incremental imaging improvements in the iPhone 5S are in software, not the actual camera hardware.)


I am able to plot a bit of an uptake this year of more conscious and healthier food-intake in some of my immediate surroundings. This may in part be due to a partially proportional amount of uptake in food allergies or just due to my getting older.

Eating healthy isn't exactly a new thing, though. Quite the contrary, in fact. The fundamental rules of diets like Paleo are based on our primal past. And if you just want to grab your greens from the farmers market instead of eating at McDonald's (no offense) that's perfectly fine too.

On the tools-side, blender manufacturers like Vitamix must be one of the most conservative on the planet. Their model 5200 has been around since 2007, you can still by it new (I did), and you get a 7 year warranty on it. Why would you replace your blender every year anyway?

Side-note: If you are looking for a great, practical introduction to Paleo, get the Paleo Primer. It's much less theoretical than the usual suspect and full of great varieties that'll even make your kids happy.


That brings us to the technology sector. Has 2013 really been this disappointing?

For example, 3D printing got much more affordable in 2013. While it may still be a few years off until you can finally stop leaving the house altogether and print fresh underwear at home, you can get a 3D printer for under $1,000 these days. Commercial products like the Cubify Cube are a bit more expensive, but there's always the RepRap Open Source project that will even supply you with the accompanying printable objects.

And, these printers are being heavily used by the people who are prototyping the products you’re buying right now. Walk into many design studios and you’ll find bins full of 3D printed mock-ups and prototypes.

2013 has also been the year of the civil drone. Both Amazon and DHL have announced tests of commercial package delivery via unmanned drones, all of which were made possible by advancements in technology.

And even the controversial technology stepchild that is Google Glass deserves a spot in the technical innovations of 2013, even though Mims laughs at it in his piece. I wouldn't go so far to award it the Mobile Product of the Year, but it is an innovation, plain and simple. It might take another few years to really come to fruition, but it’s a definite sign of how the computer-to-perpetually-connected-personal-device-transition is going to play out.

In conclusion, most of the innovation in 2013 flew under the radar (some quite literally) and was mostly incremental and evolutionary. But when comparing several different sectors, it's glaringly obvious that we technologists have been spoiled by a continuum of tiny revolutions in a very short, compressed timespan. So much so, that we're caught up in declaring each individual product either revolutionary or not when in reality, innovation is happening steadily, right in front of our eyes, sometimes creating a new continuum that cannot be grasped immediately.

Repeating revolutions at the pace they just so happened to occur in the past is not only not feasible in the long run, it's a completely unrealistic and unhealthy expectation.

Take a step back, look at our connected world as it is today, and you'll realize that what we have here is the amazing result of hundreds of innovators putting their lifeblood into their products, some of which among our direct peers.

I'm excited about technology today and just as excited about what the future brings.