How to resize / resize a window using python-xlib?

How to resize / move a window using python-xlib? I have an X window id. What is the equivalent python-xlib snippet for wmctrl -i -r $id -e $gravity,$x,$y,$width,$height ?

+6
source share
1 answer

You need to configure the Window request to change the x, y, width, height and ChangeWindowAttributes requests to change the gravity. You can use them directly or with a resource / window wrapper

 win = xobject.drawable.Window(display, id) win.configure(x=123, y=345, width=678, height=910) win.change_attributes(win_gravity=X.NorthWestGravity, bit_gravity=X.StaticGravity) 
+3
source

Source: https://habr.com/ru/post/918594/


All Articles