Clean Slate

sasha t solomon

Improve your Wizard Skillz with Slate

Improve your Wizard Skillz with Slate

25 Mar 2014


One of the first things I HAD to do when I switched to Mac was set up something so that I could sanely organize all the windows I had open.

Macs do not come set up with a very powerful window management system. Many people just fullscreen everything or have a mess of open applications haphazardly arranged on the screen. Others set up hot corners so they can more easily manage which applications go where.

But that wasn’t good enough for me. I’m a developer and I usually have the same windows open all the time, and that means I need them easily accessible.

Enter Slate.

Nothing makes me more productive (and more incapable of functioning on someone else’s computer) than Slate.

Slate allows you to bind key combinations to different window actions. Anything from creating a default window layout to fullscreening a window to throwing a window to a different monitor. My favorite action is bringing the application I want into focus instantly (I feel like a wizard when I do this).

I like to use slate using the hyper key. This is a magical ‘key’ that is actually a combination of keys (control+option+command+shift). I decided to map capslock to hyper. Since I never actually use the capslock key, changing it to hyper makes it actually useful.

If you want to do this, it takes a little more setup.

You’ll need to install the aptly named PCKeyboardHack. Here under Settings, you’ll check the Change Caps Lock checkbox and change the caps lock key code to 80.



If you want to use the hyper key, you’ll need to install KeyRemap4MacBook (another excellently named and not-sketchy-sounding tool) next.

After it’s installed, go to Misc & Install and under Custom Setting, click Open private.xml




Add the following bit of XML under the root element:

After you save the file, click on the Change Key tab, press Reload XML, search for ‘Remap Caps Lock to Hyper’, and check the Remap Caps Lock to Hyper box.



After all of that is done, you’ll need to go to your Mac System Preferences under the Keyboard tab and click Modifier Keys… on the bottom right. Find Caps Lock, be sure that No Action is chosen in the dropdown, and hit OK. (You’ll also have to do this again if you have an external keyboard).



Now that we have the hyper key, we can finally download Slate.

Slate gives you a configuration file: ~/.slate. So, open up your .slate file and you can start configuring to your heart’s desire!

Some good-to-know commands:
alias
allows you to alias directives so that you can use them later (without having to type everything out again).
layout
used to arrange applications a certain way (or perform specific actions) when in a given layout setting. I use this to specify different arrangements of my applications when I’m on a single monitor vs. two monitors.
bind
binds key combinations to operations. I mainly use this directive to assign key combinations for bringing different applications into focus.
default
can be used to automatically have default application configurations when used with layout. I use this directive to have a default application configuration with hyper + p.

Here’s what I’ve done:

And that’s it! You can configure Slate to whatever works best for you and you’ll become a wizard in no time!

If you want to hone more of your wizarding skillz, take a look at this post by @msol which describes how to set up some other awesome development tweaks.