3

I would like to programmatically be able to communicate with the Window Manager in Gnome 3, using D-Bus. The tasks I would like to accomplish are:

  • listening for new windows
  • get window flags (e.g. skip pager flag)
  • get X window IDs
  • maximise, minimise windows
  • raise, lower windows
  • hide windows The aim is to create an task-bar-like application.

I know of tools such as xdotools or wmctrl, but those are very thorough tools: there are no listeners to find out if new windows have been instantiated / mapped, the latte works with window title strings.

I also tried using python-xlib, but lack of documentation or too technical documentation have made it very difficult to achieve anything.

It seems D-Bus would be appropriate for such actions. Can I use D-Bus to do this, is there a way to do this using Python? Could you provide examples?

  • check devilspie and devilspie2 – zb' May 6 '18 at 12:43
0

You would need a D-Bus-to-X11 interface in order to do this. There is no such thing.

  • Ok, so how do you listen to newly mapped windows, as with a new pop-up for instance? And what API would you use? Is a xdotool good enough to build a shell or do you need to use python-xlib perse? – Benjamin Dec 23 '11 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.