OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: daniel3000 on October 30, 2006, 04:18:53 am

Title: Openbox: Handle Window Via Comand Line?
Post by: daniel3000 on October 30, 2006, 04:18:53 am
Hello,

I'd need to write some scripts which should raise a program window from the background (or an iconified window) to the foreground and maximize it.

Is Openbox able to handle that? Or are there WM-independent helper programs for such purposes?
Or do I have to use another Window manager? Which one would be able to do that?

Thanks a lot!
daniel
Title: Openbox: Handle Window Via Comand Line?
Post by: InSearchOf on October 30, 2006, 07:48:00 am
I can't picture what you are trying to accomplish... or maybe I'm thinkin a little to hard about it... :-)

Like a script that maxamizes a minimized window... and if that script going to be mapped to a key? So basicly it would be like a "reverse" show desktop?

Late
Title: Openbox: Handle Window Via Comand Line?
Post by: daniel3000 on October 30, 2006, 09:44:23 am
Quote
I can't picture what you are trying to accomplish... or maybe I'm thinkin a little to hard about it... :-)

Like a script that maxamizes a minimized window... and if that script going to be mapped to a key? So basicly it would be like a "reverse" show desktop?

Late
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145112\"][{POST_SNAPBACK}][/a][/div]

Yes, kind of:
The application keys for "Calendar", "Address" etc. are configured to open the PIM apps KO/PI, KA/PI etc.
However, if KO/PI is started and minimized, and if I then press the "Calendar" key again, another instance of KO/PI is started, which should not happen.
Instead the other window, which is probably minimized or in the background (otherwise the user would have seen it) should be raised to the foreground and get the focus.

I thought about a script structure like

Code: [Select]
ps | grep -v "grep" | grep kopi
if [ $? -ne 0 ]; then
   kopi
else
   "raise_window kopi"
fi

I would then assign the applicatoin key to that script rather than to the kopi binary.

QTopia has this feature built-in, and especially for PDA-style use of the Zaurus it is a very important feature. Nobody wants to wait some minutes to load a second instance of KO/PI when he presses the "calendar" key to have a quick look at the calendar.

daniel