How to drag window from anywhere on the window without using the title bar?

I have made iTerm borderless, like this:

Image of iTerm window

So, how can I move the window from anywhere inside the window and not just the title bar?


Solution 1:

To move any window, including borderless ones such as iTerm, you can move the mouse to any edge of the window until the cursor become a double-arrow, then click and hold while moving the mouse in a direction opposite of what would change the window size.

As an example, if you mouse over the top edge while the cursor is a double-arrow then click, hold and drag upwards or downwards it makes the window larger or smaller respectively, however if you drag left or right the window moves and once moving you can drag it anywhere and then release the mouse when you have the window where you want it.

The same paradigm applies on any edge of the window, moving the mouse to any edge, to where the cursor becomes a double-arrow then click and hold, and move in a direction that will not make the window larger or smaller will move the window instead.


Update:

This answer was originally posted on Nov 21 '16 and the target OS was OS X 10.11 El Capitan and works as stated for that OS.

There have been recent comments about it on macOS High Sierra and if the Title Bar is showing then it can be moved as described however if the Title Bar is not showing then it can only be moved in the manner described from the top of the window. That said though I've noticed it can be a bit finicky but I can move it as described when tested under macOS 10.13.3 in reference to this update notice.

Solution 2:

macOS has the ability to mouse move windows natively, it just happens to be disabled by default.

From Terminal:

defaults write -g NSWindowShouldDragOnGesture -bool true

Then log out/in or reboot for the setting to take effect.

Once rebooted, you can press control+command and left-click inside most windows and drag to move it.

To stop this behavior, you can delete this defaults setting from Terminal:

defaults delete -g NSWindowShouldDragOnGesture

Then log out/in or reboot for the change to take effect.


Note: This setting has worked since OS X Yosemite.