55 lines
2.4 KiB
Markdown
55 lines
2.4 KiB
Markdown
---
|
|
title: 'Organizing Windows using the Keyboard with Compiz Grid'
|
|
date: 2011-06-30T11:44:00.000Z
|
|
draft: false
|
|
taxonomies:
|
|
tags: [ "ubuntu" ]
|
|
categories: [ "os"]
|
|
|
|
|
|
---
|
|
|
|
The Mac has a great utility called Divvy to easily map windows to
|
|
loacation on the screen using the keyboard. Fiddling with the mouse to
|
|
get multiple windows in the right location is a productivity killer
|
|
and a pain in the neck (or shoulder, or elbow, or …)
|
|
|
|
Ubuntu (and of course any other Linux distro with compiz) has a
|
|
similar feature built in as a plugin for compiz. Type Alt-F2 and enter
|
|
**ccsm** + Return in the command prompt to launch the CompizConfig
|
|
Settings manager.
|
|
|
|
Select the **Window Management** from the left menu and enable the
|
|
**Grid** plugin. Click on it so you can look at the key bindings in
|
|
the **Bindings** tab. If you are on a desktop or a big laptop with a
|
|
separate numeric keyboard you are set. As you can see the locations
|
|
for the windows are by default mapped in a logical fashion like the
|
|
arrow keys on the numeric keypad. However my laptop does not have a
|
|
separate numeric keyboard and enabling it before typing the key code
|
|
is a pain. Remapping them is easy by clicking on the button with the
|
|
key code. A window appears with a **Grab key code** button. Click it
|
|
and type the new keycode you want to assign it to.
|
|
|
|
If there is a conflict, you will get a window explaingin the conflict
|
|
and asking how to resolve it. My first attempt was to remap the laptop
|
|
numeric keys using the super keys. This conflicted with the unity
|
|
launcher since the top row 7-8-9 map to the apps in the launcher. To
|
|
avoid conflicts I use now Control-Super with the keys around the j-key
|
|
(which is the home key for the right hand) Also autokey (a text macro
|
|
expander) is mapped to Super-K
|
|
|
|
* Control-Super-j : 100% (maximize)
|
|
* Control-Super-h : 50% left
|
|
* Control-Super-k : 50% right
|
|
* Control-Super-u : 50% top
|
|
* Control-Super-m : 50% bottom
|
|
* Control-Super-y : 25% top-left
|
|
* Control-Super-i : 25% top-right
|
|
* Control-Super-n : 25% bottom-left
|
|
* Control-Super-, : 25% bottom-right
|
|
|
|
If Control-Super-j is used to maximize a window, clicking on one of
|
|
the other keys will first restore it to the original size and position
|
|
and only map it to its place on the second click. I consider this a
|
|
feature, but you are free to interprete it as a bug. Result, this is
|
|
now super practical way to divide my windows on my screen.
|