注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Package:Qtile"

From Funtoo
Jump to navigation Jump to search
m (Added Ebuild meta templates)
(Ugraded doc to qtile 0.10.6 and removed python 3.3 specific explanations)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Ebuild
{{Ebuild
|Summary=A full-featured, hackable tiling window manager written in Python
|Summary=A pure-Python tiling window manager.
|CatPkg=x11-wm/qtile
|CatPkg=x11-wm/qtile
|Maintainer=radhermit@gentoo.org (Tim Harder)
|Maintainer=pytony
|Homepage=http://www.qtile.org/
|Homepage=http://www.qtile.org/
}}
}}


= Introduction =  
== About Qtile ==
This wiki is a work in progress.


Python3 will cause errors. Use '''Python2''' as default or '''at the very least''', pass PYTHON=python2.7 to py2cairo and xpyb before configuring them.  
Qtile is a highly configurable tiling window manager distributed under MIT license. It handles both '''tiling and floating''' layouts. It is especially a good alternative to [[Package:Awesome (Window Manager)|Awesome]] for those who are more used to [[Python]] than [[Package:Lua|Lua]]. Indeed, Qtile is written and configured entirely in Python. So whether you are Python guru or whether you are learning Python for a few time, Qtile is an ideal choice to get your environment fit ''your'' needs and feel. If you don't know Python, you can still stuck to the default configuration or pick out one of the [https://github.com/qtile/qtile-examples configuration examples] but a basic understanding of Python language is recommended though.


"Qtile is a full-featured, hackable tiling window manager written in Python.
== Installation ==


Qtile is simple, small, and extensible. It's easy to write your own layouts, widgets, and built-in commands.
<console>
###i## emerge -av qtile
</console>


Qtile 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.
It is generally a good idea to enable the <code>dbus</code> useflag to deal with dbus messages. The <code>widget-*</code> useflags are only needed if you would like to include the given widgets. These widgets are included in Qtile, but require additional dependencies. Leaving <code>widget-*</code> useflags unset will remove the underlying widgets from qtile sources to avoid warnings about missing dependencies.


The Qtile community is active and growing, so there's always someone to lend a hand when you need help.
Very likely, you don't need to enable multiple python ABIs for qtile. To make your mind, here are the few things to know to choose the right ABI:


Qtile is free and open-source software, distributed under the permissive MIT license"<ref>[http://qtile.org Qtile]</ref><ref>[http://docs.qtile.org/en/latest/manual/license.html License]</ref>
* Python 2.7 uses [[Package:Trollius|trollius]], Python >=3.4 uses asyncio (which is now built-in).
* Wlan widget depends on packages that are python 2.7 only. If you plan to use this widget, use python 2.7 target.


== The Qtile Community ==


=== IRC ===
Once you've emerged qtile with the useflags and python target of your choice, you can skip to [[#Getting Started]] if you use a [[:Category:Display_Managers|display manager]]. The following lines describe how to use qtile with [[Pacakge:Xinit|Xinit]].
[irc://irc.oftc.net:6667/qtile irc://irc.oftc.net:6667/qtile]


=== Mailing List ===
In order to run qtile with xinit, add this line to your <code>~/.xinitrc</code>:
qtile-dev on Google Groups


=== Twitter ===
{{file|name=~/.xinitrc|body=
@qtile on Twitter
exec --sh-syntax --exit-with-session qtile
}}


===Forum ===
You might also want to pass <code>ck-launch-session</code> and/or <code>dbus-launch</code> if you want respectively [[Package:ConsoleKit|ConsoleKit]] and/or [[Package:Dbus|dbus]] support (note that the latter requires the `dbus` useflag). Your <code>~/.xinitrc</code> would then look like:
[kobraz.org.ua/qforum]


After on people begin used this forum, we move it to qtile.org
{{file|name=~/.xinitrc|desc=with consolekit and dbus support|body=
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session qtile
}}


== Troubleshooting ==
And run <code>xinit</code> to launch qtile. You can also configure a display manager instead, but this is not covered in this document.
[https://github.com/qtile/qtile/issues Issues]


== Documentation ==
== Getting Started ==
[http://docs.qtile.org/en/latest/index.html# Qtile Documentation]


= Installation =
{{tip|As far as possible, when a default behavior is explained, a link to the related configuration snippet is given so that you can get more information and tweak it as you want.}}


== Portage ==
When Qtile is run and no valid configuration file is found, it fallbacks to [https://github.com/qtile/qtile/blob/v0./libqtile/resources/default_config.py the default configuration]. So, the first time you run qtile, you should be welcomed with a black background and [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L111-L121 a bottom bar]. On the left of this bottom bar, stands the list of your workspaces [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L85 represented by the characters 'a', 's', 'd', 'f', 'u', 'i', 'o', 'p']. On the right of the bottom bar, you should see [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L116-L118 "default config" followed by the date and time].
<pre style="color:green"># emerge qtile</pre>


== Manual (Github) ==
You can press [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L82 <code>Mod4 + r</code> to open a prompt box], then type a program name to launch it. You can also [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L74 run xterm with the shortcut <code>Mod4 + Return</code>]. To [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L78 close a window, press <code>Mod4 + w</code>].
This section is taken from the documents from Qtile.<ref>[http://docs.qtile.org/en/latest/manual/install/gentoo.html Installation on Gentoo]</ref>


=== Dependencies ===
Workspaces are highlighted in [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/widget/groupbox.py#L153 white font] when windows are opened in them (against [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/widget/groupbox.py#L154 gray font] when it contains no window). The current workspace is [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/widget/groupbox.py#L169 surrounded with a blue border], if you have multiple screens, workspaces currently displayed in other screens are [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/widget/groupbox.py#L174 surrounded with a gray border]. You can [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L90 go to a given workspace pressing <code>Mod4 + <workspace ID></code>] (a, s, d, f, u, i, o or p by default). If you go to a workspace that is already displayed in another screen, workspaces will be swapped. You can [https://github.com/qtile/qtile/blob/v0.10.6/libqtile/resources/default_config.py#L95 move the current window to a given workspace pressing <code>Mod4 + Shift + <workspace ID></code>].
USE flags and keyword changes may have to be made for the packages taken from portage.  


==== libxcb ====
== Configuration ==
libxcb can be emerged from portage.


<pre style="color:green"># emerge libxcb</pre>
Qtile looks in the following places for a configuration file, in order:
book.com/
# The location specified by the <code>-f</code> argument.
# <code>$XDG_CONFIG_HOME/qtile/config.py</code>
# <code>~/.config/qtile/config.py</code>


==== xpyb ====
{{tip|At anytime, you can fire <code>Mod4 + Ctrl + r</code> to restart qtile with your new configuration. You should also `tail -f ~/.qtile.log` to checkout errors and warnings while editing your Qtile configuration.}}
xpyb can be emerge from portage. Make sure that you are emerging xpyb-1.3.1


<pre style="color:green"># emerge xpyb</pre>
In order to configure your Qtile environnement, I would suggest you to start with the default config base and tweak it bit by bit:


==== cairo ====
<console>
cairo can be emerged from portage.
$##i## mkdir -p ~/.config/qtile
$##i## wget -O ~/.config/qtile/config.py https://raw.githubusercontent.com/qtile/qtile/v0.10.6/libqtile/resources/default_config.py
$##i## vim ~/.config/qtile/config.py
</console>


Have USE flags set to <pre style="color:purple">X glib opengl svg xcb</pre>
{{warning|Don't forget to replace "v0.10.6" with the version you installed or it may not work.}}


and then:
=== Customize bars ===


<pre style="color:green"># emerge cairo</pre>
The first thing you might want to customize is the bottom bar on the first screen. Here is the default code:


==== pygtk ====
{{file|name=~/.config/qtile/config.py|lang=python|body=
pygtk can be emerge from portage.
screens = [
    Screen(
        bottom=bar.Bar(
            [
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("default config", name="default"),
                widget.Systray(),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
            ],
            30,
        ),
    ),
]
}}


<pre style="color:green"># emerge pygtk</pre>
If you want this bar to be on top, replace {{c|bottom<nowiki>=</nowiki>bar.Bar(}} by {{c|top<nowiki>=</nowiki>bar.Bar(}}. Of course, you can have a bar on top and on bottom. Just specify both {{c|top}} and {{c|bottom}} as {{c|Screen}} keyword arguments. You can also place bars on the left or on the right, using Screen's {{c|left}} and {{c|right}} keyword arguments.


==== py2cairo ====
The first argument of {{c|bar.Bar()}} is a list of widgets (we'll talk about it later). The second argument is the thickness of the bar in pixels.
<pre style="color:green"># git clone git://git.cairographics.org/git/py2cairo
# cd py2cairo
# ./autogen.sh --enable-xcb
# ./configure --prefix=/path/to/virtualenv
# make
# sudo make install</pre>


As an alternative to virtualenv, you can
If you have multiple screens and want bars on both screens, you must de define multiple Screen instances.
<pre style="color:green"># ./configure --prefix=/usr</pre>
But the virtualenv is the recommended option in installation.


==== qtile ====
==== Example ====
<pre style="color:green"># git clone git://github.com/qtile/qtile
# cd qtile
# sudo python setup.py install --record files_uninstall.txt</pre>


= Setup =
{{file|name=~/.config/qtile/config.py|lang=python|body=
'''Copy''' either a config from the examples directory in the cloned qtile '''(including a default config)''', a config you have found elsewhere, or create your own config.
screens = [
<pre style="color:green"># cp /path/to/cloned-qtile/examples/config/cortesi-config.py ~/.config/qtile/config.py
    Screen(
# cp /path/to/cloned-qtile/examples/config/dgroups.py ~/.config/qtile/config.py
        bottom=bar.Bar(
# cp /path/to/cloned-qtile/examples/config/roger-config.py ~/.config/qtile/config.py
            [
# cp /path/to/cloned-qtile/examples/config/tailhook-config.py ~/.config/qtile/config.py</pre>
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("I am a 30px height bottom bar", name="default"),
                widget.Systray(),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
            ],
            30,
        ),
    ),
    Screen(
        top=bar.Bar(
            [
                widget.WindowName(),
                widget.TextBox("I am a 24px height top bar", name="default"),
            ],
            24,
        ),
        right=bar.Bar(
            [
                widget.TextBox("I am a 50px width right bar", name="default"),
                widget.Systray(),
            ],
            50,
        ),
    ),
]
}}


My config is [https://github.com/akiress/dotfiles/blob/master/qtile/config.py config.py]
=== Customize workspaces ===


The config I have based mine off of is [https://github.com/dmpayton/dotfiles/blob/master/qtile/config.py dmpayton's config.py]
By default workspaces are labelled 'a', 's', 'd', 'f', 'u', 'i', 'o', 'p' and can be accessed via {{c|Mod4 + a}}, {{c|Mod4 + s}}, ...


= Testing Qtile Installation =
{{file|name=~/.config/qtile/config.py|lang=python|body=
You can test your installation of Qtile while within another WM instance using Xephyr.
groups = [Group(i) for i in "asdfuiop"]


Examples:
for i in groups:
<pre style="color:green"># Xephyr :1 -screen 800x600 -a -v -noreset
    # mod1 + letter of group = switch to group
# DISPLAY=:1
    keys.append(
# /path/to/qtile/qtile</pre>
        Key([mod], i.name, lazy.group[i.name].toscreen())
or using built in code:<ref>[[ https: // groups.google.com/group/qtile-dev/browse_thread/thread/26191253a8190568 qtile-dev Google Group ]]</ref>
    )
<pre style="color:green"># echo "exec qtile" > .start_qtile ; xinit .start_qtile -- :1</pre>


For further information, see the Documentation section.
    # mod1 + shift + letter of group = switch to & move focused window to group
    keys.append(
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name))
    )
}}


== dmenu ==
You can name your workspaces as you want, changing the string "asdfuiop". As far as I am concerned, I rather like having keys such as F1, F2, F3, ... mapped for my workspaces. Thus I think numbered workspaces are better:
Qtile uses dmenu as the application launcher.
<pre style="color:green"># emerge dmenu</pre>
You can run dmenu from a keybind in the config.py.


== xinitrc ==
{{file|name=~/.config/qtile/config.py|lang=python|body=
An example of preparing Qtile to start with a startup-session script for autostarting apps.
groups = [Group(i) for i in "12345"]
My ~/.xinitrc
<pre style="color:purple">#!/bin/zsh
xrdb -merge ~/.Xresources
xcompmgr &


if [[ $1 == "i3" ]]; then
for i in groups:
     exec ck-launch-session dbus-launch --sh-syntax --exit-with-session i3 -V -d all > ~/.i3/i3log-$(date +'%F-%k-%M-%S') 2>&1
    grp = group[i].name
elif [[ $1 == "razor" ]]; then
     key = 'F%d' % (i+1)
    exec ck-launch-session dbus-launch startrazor
    keys.append(Key([mod], key,
elif [[ $1 == "awesome" ]]; then
                    lazy.group[grp].toscreen()))
     exec ck-launch-session dbus-launch awesome
     keys.append(Key([mod, "shift"], key,
elif [[ $1 == "qtile" ]]; then
                    lazy.window.togroup(grp)))
    exec ck-launch-session dbus-launch ~/.qtile-session
}}
else
    echo "Choose a window manager"
fi</pre>
My ~/.qtile-session
<pre style="color:purple">conky -c ~/.conky/conkyrc_grey &
sh ~/.fehbg &
dropbox &</pre>
 
== X and RandR ==
'''NOTE: RandR and Xinerama do not play together. Use one or the other.'''
 
I use an AMD HD 6870 with 3 monitors (2 DVI and 1 with an AMD validated Mini DisplayPort™ to DVI dongle).
 
Install xrandr:
<pre style="color:green"># emerge x11-apps/xrandr</pre>
and if you want a GUI with xrandr:
<pre style="color:green"># emerge x11-misc/arandr</pre>
 
If you do not have X configured yet, follow the link on the [http://en.gentoo-wiki.com/wiki/X.Org Gentoo Wiki]
 
My xorg.conf.d folder for example: [https://github.com/akiress/dotfiles/blob/master/etc/X11/xorg.conf.d/30-screen.conf 30-screen.conf]
 
Since the names of the monitors are already known in xrandr, I just use those names in my 30-screen.conf configuration. It doesn't matter what you use in your X configuration however.


Once you have X configured however you like, start qtile with either:
=== Startup applications ===
<pre style="color:green"># startx</pre>
or, in a case similar to mine,
<pre style="color:green"># xinit qtile</pre>


== Starting with CDM ==
The Group object accepts a spawn argument that is the name of an application to launch on this group when qtile starts up. Unfortunately, you can currently autostart only one application per group.
Another good tool for starting qtile is '''CDM''' (short for Console Display Manager). To make it work, just merge cdm
<pre style="color:green"># emerge -avt cdm</pre>
and add it to autostart with
<pre style="color:green"># cp /usr/share/cdm/zzz-cdm-profile.sh /etc/profile.d/zzz-cdm-profile.sh</pre>
Now add to /etc/X11/cdm/cdmrc the following lines:
<pre style="color:purple">binlist=(
    "/usr/bin/xinit ${HOME}/.start_qtile --:0"
    "/bin/bash --login"
    "/bin/zsh"
)
namelist=(qtile "Console bash" "Console zsh")
flaglist=(C C C)
consolekit=no</pre>
and check that ${HOME}/.start_qtile contains just the following
<pre style="color:purple">exec qtile</pre>


= Notes =
For instance, if you want to run urxvt and on the group "a" and firefox on the group "s", you could right something like this.
<references/>
{{file|name=~/.config/qtile/config.py|lang=python|body=
startapps = {'a': 'urxvt', 's': 'firefox'}
groups = [Group(i, spawn=startapps.get(i)) for i in "asdfuiop"]}}


= Resources =
=== Configuration examples ===
[https://github.com/qtile/qtile Qtile on Github]


[https://github.com/qtile/qtile/tree/master/examples/config Sample Configurations]
<div class="row">
<div class="col-md-6">
<table class="table table-striped">
<tr><th>[[User:Pytony|pytony]]'s configuration</th></tr>
<tr><td>[[File:Qtile_Pytony_Screenshot.jpg|300px|thumb|center]]</td></tr>
<tr><td>https://github.com/apinsard/mycfg-qtile/blob/master/config.py</td></tr>
</table>
</div>
<!-- ADD YOUR CONFIGURATION FILE
<div class="col-md-6">
<table class="table table-striped">
<tr><th>[[User:YOURUSERNAME|YOURUSERNAME]]'s configuration</th></tr>
<tr><td>[[File:YOUR_QTILE_SCREENSHOT.JPG|300px|thumb|center]]</td></tr>
<tr><td>LINK TO YOUR CONFIGURATION FILE</td></tr>
</table>
</div>
-->
</div>


[http://docs.qtile.org/en/latest/manual/hacking.html Hacking Qtile]
[https://github.com/qtile/qtile-examples See other examples]


{{EbuildFooter}}
{{EbuildFooter}}


[[Category:Desktop]]
[[Category:Desktop]]

Latest revision as of 18:42, November 16, 2016

Qtile

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


About Qtile

Qtile is a highly configurable tiling window manager distributed under MIT license. It handles both tiling and floating layouts. It is especially a good alternative to Awesome for those who are more used to Python than Lua. Indeed, Qtile is written and configured entirely in Python. So whether you are Python guru or whether you are learning Python for a few time, Qtile is an ideal choice to get your environment fit your needs and feel. If you don't know Python, you can still stuck to the default configuration or pick out one of the configuration examples but a basic understanding of Python language is recommended though.

Installation

root # emerge -av qtile

It is generally a good idea to enable the dbus useflag to deal with dbus messages. The widget-* useflags are only needed if you would like to include the given widgets. These widgets are included in Qtile, but require additional dependencies. Leaving widget-* useflags unset will remove the underlying widgets from qtile sources to avoid warnings about missing dependencies.

Very likely, you don't need to enable multiple python ABIs for qtile. To make your mind, here are the few things to know to choose the right ABI:

  • Python 2.7 uses trollius, Python >=3.4 uses asyncio (which is now built-in).
  • Wlan widget depends on packages that are python 2.7 only. If you plan to use this widget, use python 2.7 target.


Once you've emerged qtile with the useflags and python target of your choice, you can skip to #Getting Started if you use a display manager. The following lines describe how to use qtile with Xinit.

In order to run qtile with xinit, add this line to your ~/.xinitrc:

   ~/.xinitrc
exec --sh-syntax --exit-with-session qtile

You might also want to pass ck-launch-session and/or dbus-launch if you want respectively ConsoleKit and/or dbus support (note that the latter requires the `dbus` useflag). Your ~/.xinitrc would then look like:

   ~/.xinitrc - with consolekit and dbus support
exec ck-launch-session dbus-launch --sh-syntax --exit-with-session qtile

And run xinit to launch qtile. You can also configure a display manager instead, but this is not covered in this document.

Getting Started

   Tip

As far as possible, when a default behavior is explained, a link to the related configuration snippet is given so that you can get more information and tweak it as you want.

When Qtile is run and no valid configuration file is found, it fallbacks to the default configuration. So, the first time you run qtile, you should be welcomed with a black background and a bottom bar. On the left of this bottom bar, stands the list of your workspaces represented by the characters 'a', 's', 'd', 'f', 'u', 'i', 'o', 'p'. On the right of the bottom bar, you should see "default config" followed by the date and time.

You can press Mod4 + r to open a prompt box, then type a program name to launch it. You can also run xterm with the shortcut Mod4 + Return. To close a window, press Mod4 + w.

Workspaces are highlighted in white font when windows are opened in them (against gray font when it contains no window). The current workspace is surrounded with a blue border, if you have multiple screens, workspaces currently displayed in other screens are surrounded with a gray border. You can go to a given workspace pressing Mod4 + <workspace ID> (a, s, d, f, u, i, o or p by default). If you go to a workspace that is already displayed in another screen, workspaces will be swapped. You can move the current window to a given workspace pressing Mod4 + Shift + <workspace ID>.

Configuration

Qtile looks in the following places for a configuration file, in order: book.com/

  1. The location specified by the -f argument.
  2. $XDG_CONFIG_HOME/qtile/config.py
  3. ~/.config/qtile/config.py
   Tip

At anytime, you can fire Mod4 + Ctrl + r to restart qtile with your new configuration. You should also `tail -f ~/.qtile.log` to checkout errors and warnings while editing your Qtile configuration.

In order to configure your Qtile environnement, I would suggest you to start with the default config base and tweak it bit by bit:

user $ mkdir -p ~/.config/qtile
user $ wget -O ~/.config/qtile/config.py https://raw.githubusercontent.com/qtile/qtile/v0.10.6/libqtile/resources/default_config.py
user $ vim ~/.config/qtile/config.py
   Warning

Don't forget to replace "v0.10.6" with the version you installed or it may not work.

Customize bars

The first thing you might want to customize is the bottom bar on the first screen. Here is the default code:

   ~/.config/qtile/config.py (python source code)
screens = [
    Screen(
        bottom=bar.Bar(
            [
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("default config", name="default"),
                widget.Systray(),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
            ],
            30,
        ),
    ),
]

If you want this bar to be on top, replace bottom=bar.Bar( by top=bar.Bar(. Of course, you can have a bar on top and on bottom. Just specify both top and bottom as Screen keyword arguments. You can also place bars on the left or on the right, using Screen's left and right keyword arguments.

The first argument of bar.Bar() is a list of widgets (we'll talk about it later). The second argument is the thickness of the bar in pixels.

If you have multiple screens and want bars on both screens, you must de define multiple Screen instances.

Example

   ~/.config/qtile/config.py (python source code)
screens = [
    Screen(
        bottom=bar.Bar(
            [
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("I am a 30px height bottom bar", name="default"),
                widget.Systray(),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
            ],
            30,
        ),
    ),
    Screen(
        top=bar.Bar(
            [
                widget.WindowName(),
                widget.TextBox("I am a 24px height top bar", name="default"),
            ],
            24,
        ),
        right=bar.Bar(
            [
                widget.TextBox("I am a 50px width right bar", name="default"),
                widget.Systray(),
            ],
            50,
        ),
    ),
]

Customize workspaces

By default workspaces are labelled 'a', 's', 'd', 'f', 'u', 'i', 'o', 'p' and can be accessed via Mod4 + a, Mod4 + s, ...

   ~/.config/qtile/config.py (python source code)
groups = [Group(i) for i in "asdfuiop"]

for i in groups:
    # mod1 + letter of group = switch to group
    keys.append(
        Key([mod], i.name, lazy.group[i.name].toscreen())
    )

    # mod1 + shift + letter of group = switch to & move focused window to group
    keys.append(
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name))
    )

You can name your workspaces as you want, changing the string "asdfuiop". As far as I am concerned, I rather like having keys such as F1, F2, F3, ... mapped for my workspaces. Thus I think numbered workspaces are better:

   ~/.config/qtile/config.py (python source code)
groups = [Group(i) for i in "12345"]

for i in groups:
    grp = group[i].name
    key = 'F%d' % (i+1)
    keys.append(Key([mod], key,
                    lazy.group[grp].toscreen()))
    keys.append(Key([mod, "shift"], key,
                    lazy.window.togroup(grp)))

Startup applications

The Group object accepts a spawn argument that is the name of an application to launch on this group when qtile starts up. Unfortunately, you can currently autostart only one application per group.

For instance, if you want to run urxvt and on the group "a" and firefox on the group "s", you could right something like this.

   ~/.config/qtile/config.py (python source code)
startapps = {'a': 'urxvt', 's': 'firefox'}
groups = [Group(i, spawn=startapps.get(i)) for i in "asdfuiop"]

Configuration examples

See other examples