Be Productive on a Mac Desktop

This blog post is going to be about improving your workflow on a Mac, bringing you closer to a happier, mouse-free life. We will be talking about the desktop environment of OS X, but most of this applies to Windows as well and should be achievable using counterpart software. Linux users... well you already have all of this, so yeah, lucky you.

We will talk about 3 key areas here:

  1. Switching between apps
  2. Optimizing the use of the screen's real estate
  3. Window placement/movement

Preparation

We will be doing all the cool stuff with the help of an app called Slate. This app is an open source project that can be found here: https://github.com/jigish/slate. The compiled app can be downloaded from here. After you install it, you will have to give it access as an assistive device. This can be done by going to System Preferences > Security & Privacy > Privacy and checking Slate

The app is configured using a hidden file in your home directory called ".slate.js". By using this file, you can program the behavior of your windows and shortcuts. Since I have already programmed mine the way I like it, I will just share it with you and show you how to use it. To install my config just open the Terminal and paste the following command: "curl https://raw.githubusercontent.com/raxbg/dotfiles/master/.slate.js > ~/.slate.js". This will download my latest config to the proper place in the file system. Ok, launch Slate and let’s start.

Switching between apps

Everyone is multitasking nowadays, and we have a handful of apps opened all the time. Usually, one will use either the App Switcher

or the dock

to switch between the opened apps. However, in most cases the apps that we keep opened are more or less the same, but quickly switching between them can be tricky and slow since the order in which they appear in the task switcher changes constantly and using the dock requires reaching for the mouse. Furthermore, if the dock is hidden we have to wait for it to appear, so even slower. Hm, wouldn't it be nice if we can quickly access our favorite apps in a fast and consistent way? Keyboard shortcuts to the rescue!

I keep Google Chrome, iTerm, HipChat, Mail, Spotify and TextEdit open all the time, so in order to quickly switch between them I made several shortcuts. Each shortcut starts by hitting "cmd + j" keys and releasing them and then the first letter of the app I want to focus on. For example, if I need HipChat I will hit "cmd + j" and then "h". If the app is not running, it will be launched for you. Here is a list of all app switching shortcuts:

  • "cmd + j, f" - opens Finder
  • "cmd + j, g" - opens Google Chrome
  • "cmd + j, h" - opens HipChat
  • "cmd + j, i" - opens iTerm
  • "cmd + j, l" - opens LimeChat
  • "cmd + j, m" - opens Mail
  • "cmd + j, s" - opens Spotify
  • "cmd + j, t" - opens TextEdit

All of these have alternatives with the Alt key instead of Command, but we will talk more about these a bit later when we get to the topic of window placement modes.

By having assigned shortcuts to the most frequently used apps, we can quickly switch between them because they are a shortcut away. Once you get used to the shortcuts, using them becomes as natural as copying text with Command-C.

Optimizing the use of the screen’s real estate

No matter what screen you are on, that dock is huge by default, and it takes a lot of precious space on our screens. Why don’t we use that space for our apps to see more content? Just make it hide automatically and the problem is solved. Also, I prefer to keep my dock on the left side of the screen because my mouse cannot accidentally go there and activate the dock. If it is at the bottom or on the right (God forbid), it will pop up almost every time you need to scroll using the scrollbars (yes that happens as well). Additionally, if you still prefer to keep the dock visible, you better place it on the left side of the screen. The reason for that is because the screens are wider than taller. If you do the math, you will see that the area the dock takes on the sides is less than the area it takes at the bottom :)

Hiding the dock is cool and frees a lot of space, but the windows are still not making use of that free space. No worries, there is a shortcut for that! Just hit "alt+cmd+f" and the window will take all the available screen space. Hit the shortcut again and it will take 90% of the screen (you know, for the cases when you want to see your wallpaper in the background). Hitting this shortcut further will cycle between these 2 modes.

Now, suppose you want to have 2 or more apps open side by side to drag files between them, monitor something, etc. Instead of dragging and resizing the windows the usual way, you can hit "alt+g" and that will bring up a grid proportional to the screen's resolution where you can just drag over the squares to quickly move and resize the windows. That way you can place 3 windows side by side with pixel perfect precision.

Hint: Windows can easily take half of the screen with the "ctrl+cmd+arrow" shortcuts. For example, if you want a window on the left half of the screen you can hit "ctrl+cmd+left arrow". You can place the windows on the left, right, top or bottom using the left, right, up and down arrows respectively.

Window placement/movement

Don't you think some of the actions described above can be automated? Using the grid is cool, but if you are just going to give each app the most space it can take, this can be done automatically. In my configuration, I have programmed 3 window placement modes: Single, Tiling, and Free

Single

Initially, you start in the Single mode. In this mode, windows are placed on top of each other, each in the center of the screen and taking 90% of it. If you have more than one screen, each new window will appear on the screen with the less visible windows. Cool right? 

Tiling

In tiling mode, the opened windows are spread throughout all your available screens, each window taking up as much free space as possible. For example if you have one window and one screen, and you open a new window on the first screen, it will be automatically moved to the second screen. Why not right? If you open a third window, it will be resized to 50% of the screen's area and the one that is already open will also be resized to 50% and both windows will then be placed side by side. If you open a 4th window, the same will happen but on the other screen, so now both your screens will have two windows each taking 50% of the area. Opening a 5th window will just make one of the previous windows half the height, scale the new window to 25% of the screen's area and place it below the window which height was cut in half. The same applies if you are working on one screen, of course. Here is a quick demo of the tiling mode

 

Free

In this mode, the script does not do any automatic window positioning. Modes can be switched using the "alt+cmd+m" shortcut. A notification will show you the currently selected mode.

Auto-tiling can be triggered anytime by hitting "alt+t". This will automatically arrange your windows on the current screen.

App Selecting Shortcuts

Now that you know about the window placement modes, we can talk about the app selecting shortcuts using the "alt+j" prefix. If you pay close attention to Slate's icon in the taskbar, you will notice that it changes color when you hit "cmd+j". That is because it goes into special mode expecting further input. However hitting a key automatically goes out of this special mode and so you have to press "cmd+j" again to activate it again. So "alt+j" just enters that special mode and does not exit until you hit the shortcut again. That allows you to quickly spawn several apps. This is especially handy in tiling mode because you can quickly lay 2 or more apps on the screen. Suppose that you want to open HipChat, Mail and Finder. You can press "alt+j" once then write "hmf" and hit "alt+j again". 

And lastly, for those using multiple screens, you can move the windows left and right between the screens using "alt+cmd" and an arrow key. And yes, the windows wrap around, meaning that if you have 3 screens and you want to move a window from the third one to the first one, you can just hit "alt+cmd+right" (assuming your third screen is the rightmost one). 

I hope you had fun reading this and if you have some questions, feel free to post them in the comment section below.

Join 11,000+ subscribers receiving actionable E-commerce advice

* Unsubscribe any time

Trending blogs

comments powered by Disqus