Author Topic: Openbox: Handle Window Via Comand Line?  (Read 1904 times)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Openbox: Handle Window Via Comand Line?
« 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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Openbox: Handle Window Via Comand Line?
« Reply #1 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
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Openbox: Handle Window Via Comand Line?
« Reply #2 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
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0