How to modify a window based on its role #4719
-
Hi, I am trying to control the gtk file chooser spawned by some of the application I use because it starts up partly outside of the screen and a bit oversized to my taste. I would like to use its role to transform it using methods like To be honest I never understood how to use the 'Rule' object described in the doc and I have not found any example of it. I use Since I have been using qtile for weeks now, and I am enjoying it a lot, I'd like to understand this part better. So the window I am interested in has the All I know how to use for that purpose would be Beyond that I found the Thanks in advance for any help understanding better how this works. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
The However, there is a misunderstanding in your post: the You should therefore be able to do something like: @hook.subscribe.client_managed
def resize_dialog(client):
if client.get_wm_role() != "GtkFileChooserDialog":
return
client.set_size_floating(new_width, new_height) |
Beta Was this translation helpful? Give feedback.
-
@elParaguayo Thanks as usual for your support. I am actually back already, because when I answered you before, I thought I overlooked the Is it an omission in this otherwise quite extensive doc, or is it another misunderstanding on my part that I am not interacting with a |
Beta Was this translation helpful? Give feedback.
The
client_managed
hook is probably the way to go here.However, there is a misunderstanding in your post: the
client
object gives you much more than just the name and you can access the role.You should therefore be able to do something like: