Re: How to set up Menu items such that if an instance is already running, the running instance is brought to the foreground?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 6, 2011 at 17:59, Charles Polisher <cpolish@xxxxxxxxxxxx> wrote:
> Would this be a workable approach for the OP - wrap the app launch
> in a generalized mechanism, let's call the mechanism Larry (as I
> abhor the imprecision that comes with "it", and have no better name).
> Larry handles each attempted application launch for the seniors.
> Here's what I envision happening:
>
> Larry looks at the proposed app, and if that app has one or more
> running instances, display a dialog, with a suitably large font,
> with a clickable list that distinguishes each running instance
> of the app. At one end of the list, distinguished visually in
> some way from other items in the list, is a "nope, none of
> these, start a fresh new instance" list item. Clicking a list
> item or using the arrow keys and the enter-key would switch to
> that instance or launch a new instance of the app.
>
> Larry should have a way to back-out of any action at all - "cancel".
> And a Help button that has both an icon (I favor a question mark)
> and a (largish) text label to go with it.
>
> Larry could be assembled using bash, kdialog, and some tools
> such as xmumble and grep, right? (Mumble is a place-holder for
> an actual executable name. This isn't a fully worked example).
>
> Â#!/bin/bash
> Âitemlist=`xmumble | grep mumble | sort | ...`
> Âmyitem=$(kdialog --menu "Click what you want" $itemlist)
> Â# activate the selection or launch new app
> Â/usr/bin/mumble myitem ...
>

Charles, the only problem is brining the active window to the
foreground. xdotool will bring to the foreground a window from the
taskbar, but won't open a Skype window if Skype is running in the
system tray.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.



[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux