Rules in Qtile


I am moving from BSPWM to Qtile but I am trying figure if rules are supported but I can find anything on the Qtile documentation.

What I am trying to do is have rules that will send certain applications to specific desktops. Eg send firefox to desktop 2

On bspwm I would do something like this

bspc rule -a firefox desktop=β€˜^2’

def client_new(client):
    if == 'Firefox':


Doesn’t seem to work for me.

Not sure if it’s because I changed groups to

groups = [
Group(β€œ1”, label=β€œο„‘β€),
Group(β€œ2”, label=β€œο„‘β€),
Group(β€œ3”, label=β€œο„ β€),
Group(β€œ4”, label=β€œοƒ β€),
Group(β€œ5”, label=β€œο†Όβ€),
Group(β€œ6”, label=β€œο‡’β€),
Group(β€œ7”, label=β€œο€β€),
Group(β€œ8”, label=β€œο΅‚β€),
Group(β€œ9”, label=β€œο€β€),

It is still Group 2 regardless of the label - have you tried logging in / out?

Yes tried rebooting the system with no luck

Got it working thanks the help

how ?

This does work but case does matter with linux

if == β€˜firefox’:

at the end of if statement i have the following logger code

which pipes the application name (client) to ./local/share/qtile/qtile.log

for the logger you will need to add the following import
from libqtile.log_utils import logger

1 Like