Spawning apps in specific groups in Qtile

Hello,

Here is the code I use to assign apps to groups:


@hook.subscribe.client_new
def assign_app_group(client):
     d = {}
#     #########################################################
#     ################ assgin apps to groups ##################
#     #########################################################
     d["1"] = ["FireDragon", "firedragon" ]
     d["2"] = ["FreeTube" , "VLC", "freetube", "vlc", "Zoom", "zoom" ]
#     d["3"] = ["Inkscape", "Nomacs", "Ristretto", "Nitrogen", "Feh",
#               "inkscape", "nomacs", "ristretto", "nitrogen", "feh", ]
#     d["4"] = ["Gimp", "gimp" ]
#     d["5"] = ["Meld", "meld", "org.gnome.meld" "org.gnome.Meld" ]
     d["6"] = ["Brave-Browser", "brave-browser", "LibreWolf-Community", "librewolf-community" ]
     d["7"] = ["Thunderbird", "Tutanota-Desktop", "Unofficial-Desktop-Client-For-Protonmail", "thunderbird", "tutanota-desktop", "unoficial-desktop-client-for-protonmail" ]
#     d["8"] = ["pcmanfm", "Nemo", "Caja", "Nautilus", "org.gnome.Nautilus", "Pcmanfm", "Pcmanfm-qt",
#               "pcmanfm", "nemo", "caja", "nautilus", "org.gnome.nautilus", "pcmanfm", "pcmanfm-qt", ]
#     d["9"] = ["Evolution", "Geary", "Mail", "Thunderbird",
#               "evolution", "geary", "mail", "thunderbird" ]
#     d["0"] = ["Spotify", "Pragha", "Clementine", "Deadbeef", "Audacious",
#               "spotify", "pragha", "clementine", "deadbeef", "audacious" ]
#     ##########################################################
     wm_class = client.window.get_wm_class()[0]

     for i in range(len(d)):
         if wm_class in list(d.values())[i]:
             group = list(d.keys())[i]
             client.togroup(group)
             client.group.cmd_toscreen()

It does not work for all of the apps. On that list, it does not work for zoom, firedragon, librewolf and thinderbird . I think I am putting wrong names in there, but i can’t figure out the right ones. Please help.

Thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.