Hi,
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β
xircon
2
@hook.subscribe.client_new
def client_new(client):
if client.name == 'Firefox':
client.togroup('2')
http://docs.qtile.org/en/latest/manual/ref/hooks.html#libqtile.hook.subscribe.client_new
2 Likes
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=βοβ),
]
xircon
4
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
This does work but case does matter with linux
if client.name == βfirefoxβ:
client.togroup(β2β)
at the end of if statement i have the following logger code
else:
logger.warning(client)
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