Registered Member
|
Is there a way to determine the geometry and location
of application windows in a way that takes into account how I started these applications? Let me give an example to make it a little clearer: For instance, I'm using Kile a lot. I have 4 virtual desktops and Kile is located on the third. Let's say I compiled a Latex file and I ended up with a PDF that I'd like to view, so I hit the "ViewPDF" button in Kile. Then Okular will open to show me the PDF generated. Each time Okular is started in this way (i.e. by Kile), I'd like it to be located on desktop #4 and maximized to full screen size. But if I open a PDF via dolphin I would like okular to be displayed at my current virtual desktop. Is there any way to achieve this? Cheers, redcap |
Administrator
|
Moving to KWin, as that is the appropriate section.
I suspect this might not be possible - but if there is something else unique (like the virtual desktop number perhaps) then KWin possibly might be able to handle this.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Hi,
thanks for moving the thread to an appropriate forum. Meanwhile I found a way that works at least for Kile. Using Kile's configuration options one can pass the --caption <title> option to okular. One can then set up a Kwin rule that matches upon a suitable substring of the window title to display the application window on the desired virtual laptop. Cheers, redcap |
Global Moderator
|
Be aware that okular will automatically reload changed PDFs, so there's not really a reason to start it more than once while writing LaTeX code.
Cheers
I'm working on the KDevelop IDE.
|
|
as long as you can control the way okular is launched you can use "kstart" to determine several startup atttributes.
Using kwin scripts or rules will require to identify the window, so as long as eg. okular does not have deterministic strings in the title or the class exported, this won't work. Last option would be to check for the NE_WM_PID property, lookup the parenting process ID and thus the parenting command line, but this requires advanced scripting, including process lookup - and i'm not sure whether that is possible with integrated ECMA scripting support. |
Registered Member
|
Thanks for all the input. Using "kstart" also works, at least with Kile which more
or less was my main point of interest. So now I have at least 2 ways to solve my problem (I must admit that the scripting approach seems to be way beyond my capabilities). Again, thanks for all the help and input to all. Cheers Redcap |
Registered users: Bing [Bot], Evergrowing, Google [Bot]