From ArchWiki
Revision as of 19:03, 9 April 2011 by Infiniteh (talk | contribs) (Basic Keybindings and layout stuff: minor style changes, link to wmii page (not sure about double-quote vs. Codeline here; Codeline doesn't stand out much. Feel free to revert))
Jump to: navigation, search


i3 is a manual tiling window manager which places clients into containers. Containers can be stacked (like wmii) or tabbed (like ion3). i3 also supports floating windows.

From the website:

"i3 is a tiling window manager, completely written from scratch.
"i3 was created because wmii, the author's favorite window manager at the time, didn’t provide some features they wanted (Xinerama done right, for example), had some bugs, didn’t progress since quite some time and wasn’t easy to hack at all (source code comments/documentation completely lacking). Still, we think the wmii developers and contributors did a great job. Thank you for inspiring us to create i3.
"Please be aware that i3 is primarily targeted at advanced users and developers."


i3 is now in the community repository. Installing i3 is accomplished either by choosing the group:

pacman -S i3

or, if you only want the window manager itself, by installing i3-wm:

pacman -S i3-wm

i3-git is available in AUR - i3-git

Then edit your Template:Filename and add:

exec i3

If you want i3 to log its output (useful for debugging), add this line to Template:Filename:

exec i3 -V >>~/.i3/i3log >&1

If you use the nvidia binary drivers provided by nvidia, you must use the following in your Template:Filename due to nvidia not yet supporting randr:

exec i3 --force-xinerama -V >>~/.i3/i3log 2>&1

Basic Keybindings and Window Management

The default keybindings mostly depend on Mod1 (usually mapped to Alt) as the basic modifier key sometimes combined with Ctrl or Shift. Other binds use Mod3 as the base modifier (often the Windows-key). To identify the different Mod# keys on your system, use the command Template:Codeline without arguments.

The key combinations are configured in the file Template:Filename (or, if it does not exist, Template:Filename).

The default key combinations rely on key codes and not on the actual letters of your keyboard layout! You can replace the Template:Codeline directives in the config with Template:Codeline directives if you don't like this. For more info on configuration see the next section.

Some of the most important keybindings include the following:

  • Run a program: Mod1+v
  • Create a new terminal: Mod1+Enter
  • Switch between different windows: Mod1+ any of "jkl;" or cursor keys (somewhat Vim-like keybindings)
  • Move a window: Mod1+Shift+ any of "jkl;" or cursor keys
  • Switch to a different workspace: Mod1+ any number
  • Move window to a different workspace: Mod1+Shift+ any number

Note that i3 uses containers for window management. So in contrast to Wmii you can also tile windows horizontally. To do this, simply move a window up or down (with Mod1+Shift+DirectionKey) beyond the edge of the screen. A new row will appear. You can then use Mod4+Ctrl+DirectionKey to enlarge the window into the chosen direction. DirectionKey can be the arrow keys as well as "jkl;".

There are 3 container modes:

  • Normal: Mod1+e
  • Maximized: Mod1+w
  • Stacked: Mod4+h

Additionally, you can put a window into fullscreen mode with Mod4+f.


i3 is configured using a simple text file. It first looks for Template:Filename and if it doesn't exist, reads the default config at Template:Filename. So to start customizing, copy the config file to your home directory:

cp /etc/i3/config ~/.i3/config

The config allows you to change such things as:

  • Border colors
  • Font
  • Keybindings
  • Workspace names
  • Default container layout
  • Assignment of apps to specific workspaces

The i3 User's Guide gives a nice overview of the config settings.

Status Bar

The internal statusbar merely displays a list of the existing workspaces and does not accept infos from standard input. dzen2 can be placed in the information bar at the bottom of the screen. Information for dzen2 can be generated using i3status or conky.

i3status | dzen2 &


conky | dzen2 &

The svn development version of dzen2 in the AUR offers a -dock option, which puts dzen2 at the bottom of the screen and tells i3 not to manage it. However, if you use both the internal statusbar and conky/dzen2, you get a duplication of statusbars. You could avoid docking dzen2 and simply place it over the internal statusbar. However, a cleaner solution is to completely disable the internal statusbar with:

workspace_bar no

Now you can get back your list of workspaces, since i3 makes it available for external tools through an ipc socket. In the AUR you can find i3-wsbar, which is able to get the list of workspaces from the ipc socket. Thus you can pipe the conky output to i3-wsbar and tell it to use dzen2. E.g., put the following in Template:Filename:

exec conky | i3-wsbar -c "dzen2 -x %x -dock -fn -*-profont-*-*-*-*-11-*-*-*-*-*-*-* -ta l"

Please note that in your conky configuration file you can use the color codes for dzen2, so that you can get a nice, colored statusbar (see this sample conkyrc and the corresponding screenshot).

Other Tools

  • i3 currently uses dmenu as a launcher (by default, bound to Mod1+v)
  • i3lock - A screen locker inspired by slock