marcinpz
marcinpz

Reputation: 675

Howto to show program window in specific desktop using python

I am writing python app and need to run another program in specific (not the current one) desktop in openbox (I have 4 desktops). There is freedesktop _NET_CURRENT_DESKTOP param, but I don't know how to change it under python and gi.repository (Wnck, Gdk?). Or maybe use Xlib? I can't find what is best method to do it...

Upvotes: 3

Views: 306

Answers (1)

Frédéric Hamidi
Frédéric Hamidi

Reputation: 262939

With PyGTK, you would create a gio.AppInfo instance representing the application you want to launch, then provide a gtk.gdk.AppLaunchContext to its launch() method.

When you create the launch context, you would call its set_desktop() method to specify the index of the desktop the launched application will run on.

Upvotes: 2

Related Questions