-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help(wm) doesn't show anything. #2
Comments
I've commited into master ImmediateWM which allows to play with wm from repl.
There are no too many facilities to use orcsome like wmctrl. But you are |
Oops - just realised it was returning None. This is because I'm running in a virtualenv, and so couldn't use python-xlib. :/ |
There is no need in python-xlib in latest master. The only requirement is
cffi.
|
$ ipython
In [1]: import orcsome
In [2]: orcsome.get_wm() == None
True That's weird - should this work under gnome shell ? |
get_wm in repl always returns None. There is event loop so you must use ImmediateWM |
Note - I needed to |
Now, I have this working .. does it seems plausible to replace my dodgy use of https://gist.github.com/stuaxo/3942b4d077bb629acd2a << code, not necessarily worth looking at :) I get the window info of a process I launch - with the idea that when I relaunch I will re-apply those same properties (x, y, width, height, z-index and attributes like 'always on top' to the new window ? I'm guessing I could use "find_client" to do the initial "find the window belonging to the pid" part ? |
Yep. You can iter through wm.get_clients and match pid with |
Cool, I'll give that a go, is there a property for z-index of a window ? |
Usually it's responsibility of a WM to remember and restore client props. Orcsome have no dedicated methods/properties. There is only raw Window.get_property and WM._send_event. |
Ah, ok - I saw there is place_window_above and place_window_below. I'm doing a small reloader, so when code changes I reload the running app, + put will put it in the same place... if it's not possible to set z, I might just raise it to the top. |
Hm, you're right the location does seem to be the same - maybe I'm making work for myself :) |
There is no a "z-index" notion in XWindow. Clients are organized in stack and can be moved or be pined to the top or to the bottom of it. place_window_* are move client. |
I was wondering how to use this to get a window settings for a window belonging to some pid, but found that doing
doesn't have any info in it.
The text was updated successfully, but these errors were encountered: