A default configuration file is provided in [https://github.com/qtile/qtile/blob/master/libqtile/resources/default_config.py the git repository]. Copy it to {{ic|~/.config/qtile/config.py}} by executing:

A default configuration file is provided in [https://github.com/qtile/qtile/blob/master/libqtile/resources/default_config.py the git repository]. Copy it to {{ic|~/.config/qtile/config.py}} by executing:

Revision as of 22:26, 2 March 2013

Qtile is a full-featured, hackable tiling window manager written in Python. Qtile is simple, small, and extensible. It's easy to write your own layouts, widgets, and built-in commands.It is written and configured entirely in Python, which means you can leverage the full power and flexibility of the language to make it fit your needs.

Starting Qtile

To start Qtile add exec qtile to your ~/.xinitrc and launch Xorg. The default configuration includes the shortcut Template:Keypress to open a new xterm terminal.

Configuration

Note: This chapter only explains the basics of the configuration of Qtile. For more complete information, look at the official documentation.

The configuration is fully done in Python in the file ~/.config/qtile/config.py. For a very quick introduction to Python, you can read this tutorial. It will explain Python variables, functions, modules and other things you need to know to quickly get started on configuring Qtile.

Before restarting Qtile you can test your config file for syntax errors using the command:

$ python2 -m py_compile ~/.config/qtile/config.py

If the command gives no output, your script is correct.

Groups

In Qtile, the workspaces (or views) are called Groups. They can be defined as following:

You can find out which modX corresponds to which key with the command Xmodmap.

Screens and Bars

Create one Screen class for every monitor you have. The bars of Qtile are configured in the Screen class as in the following example:

from libqtile.config import Screen
from libqtile import bar, widget
...
screens = [
Screen(
bottom=bar.Bar([ # add a bar to the bottom of the screen
widget.GroupBox(), # display the current Group
widget.WindowName() # display the name of the window that currently has focus
], 30))
]
...