Hi, I was hoping the latest KDE updates would fix this problem, admittedly a minor one, but it's still present... If I launch Akregator from a desktop icon I created for this purpose and then close the window, leaving the Akregator status icon in the system tray, I can reopen the window either by clicking the tray icon or by opening the desktop icon. However, when Akregator was started during login as part of restoring the previous session state, only the system tray icon can be used to restore the Akregator window. If under this circumstance I double-click the desktop icon, I get a bouncing cursor icon which just times out without opening the window for the existing Akregator instance. Is this considered normal behavior? Perhaps there are options I can include in the desktop icon's akgregator command that will make it work as I want whether or not Akregator is running already and whether it was started automatically during login or manaully via the desktop icon. Currently I'm launching it like this in the desktop icon: akregator %i %m -caption "%c" Since I don't know what that means, I'm guessing I copied it from somehwere, probably the Akregator item from the KDE menu. And in fact, that's what the KDE menu item for Akregator contains: akregator %i %m -caption "%c" Perhaps this is an inappropriate incantation for my purposes. Is there a way to invoke Akregator that works whether or not it's already running and when it is running regardless of how it was launched? Thanks. Randall Schulz
On Wednesday 28 June 2006 18:06, Randall R Schulz wrote:
Hi,
I was hoping the latest KDE updates would fix this problem, admittedly a minor one, but it's still present...
If I launch Akregator from a desktop icon I created for this purpose and then close the window, leaving the Akregator status icon in the system tray, I can reopen the window either by clicking the tray icon or by opening the desktop icon.
However, when Akregator was started during login as part of restoring the previous session state, only the system tray icon can be used to restore the Akregator window. If under this circumstance I double-click the desktop icon, I get a bouncing cursor icon which just times out without opening the window for the existing Akregator instance.
Is this considered normal behavior? Perhaps there are options I can include in the desktop icon's akgregator command that will make it work as I want whether or not Akregator is running already and whether it was started automatically during login or manaully via the desktop icon.
Currently I'm launching it like this in the desktop icon:
akregator %i %m -caption "%c"
Since I don't know what that means, I'm guessing I copied it from somehwere, probably the Akregator item from the KDE menu. And in fact, that's what the KDE menu item for Akregator contains:
akregator %i %m -caption "%c"
Perhaps this is an inappropriate incantation for my purposes. Is there a way to invoke Akregator that works whether or not it's already running and when it is running regardless of how it was launched?
dcop :-) use a small script (this is not really tested so YMMV) #!/bin/bash if [ $(dcop | grep -c akregator) -gt 0 ] ; then if [ $(dcop akregator akregator_mainwindow hidden) == true ] ; then dcop akregator akregator_mainwindow setHidden false else dcop akregator akregator_mainwindow setHidden true fi else #this one you have to change to have the right params :-) akregator %i %m -caption "%c" fi regards j -- Jonas Helgi Palsson "Microsoft is not the answer. Microsoft is the question. NO is the answer." -Erik Naggum
Jonas, On Wednesday 28 June 2006 09:18, Jonas Helgi Palsson wrote:
...
Perhaps this is an inappropriate incantation for my purposes. Is there a way to invoke Akregator that works whether or not it's already running and when it is running regardless of how it was launched?
dcop :-)
Yes. A component whose power I've scarcely tapped. I have a few scripts that use it, but too few. I've found learning about it not too easy, though the self-describing aspects are pretty helpful, to the extent that verbs are well chosen and descriptive of the actions they invoke.
use a small script (this is not really tested so YMMV)
#!/bin/bash if [ $(dcop | grep -c akregator) -gt 0 ] ; then if [ $(dcop akregator akregator_mainwindow hidden) == true ] ; then dcop akregator akregator_mainwindow setHidden false else dcop akregator akregator_mainwindow setHidden true fi else #this one you have to change to have the right params :-) akregator %i %m -caption "%c" fi
regards j
Thanks. I'll give that a try.
-- Jonas Helgi Palsson
Randall Schulz
On Wednesday 28 June 2006 18:37, Randall R Schulz wrote:
On Wednesday 28 June 2006 09:18, Jonas Helgi Palsson wrote:
... dcop :-)
Yes. A component whose power I've scarcely tapped. I have a few scripts that use it, but too few. I've found learning about it not too easy, though the self-describing aspects are pretty helpful, to the extent that verbs are well chosen and descriptive of the actions they invoke.
I've not really used dcop for anything useful, but my head is full of plans to use it in diverse scripts.
use a small script (this is not really tested so YMMV)
#!/bin/bash if [ $(dcop | grep -c akregator) -gt 0 ] ; then if [ $(dcop akregator akregator_mainwindow hidden) == true ] ; then dcop akregator akregator_mainwindow setHidden false else dcop akregator akregator_mainwindow setHidden true fi else #this one you have to change to have the right params :-) akregator %i %m -caption "%c" fi
Thanks. I'll give that a try.
When you have tried afew times and have made it work, could you please post the final script? regards j -- Jonas Helgi Palsson "Microsoft is not the answer. Microsoft is the question. NO is the answer." -Erik Naggum
Jonas, On Wednesday 28 June 2006 09:50, Jonas Helgi Palsson wrote:
...
use a small script (this is not really tested so YMMV)
...
Thanks. I'll give that a try.
When you have tried afew times and have made it work, could you please post the final script?
Sure, no problem. I love BASH!
... Jonas Helgi Palsson
Randall Schulz
Jonas, On Wednesday 28 June 2006 09:50, Jonas Helgi Palsson wrote:
...
When you have tried afew times and have made it work, could you please post the final script?
Here's what I came up with. The script based on the dcop capabilities you showed me is: -==--==--==--==--==- goakregator -==--==--==--==--==--==- #!/bin/bash --norc if grep -q akregator <(dcop); then dcop akregator akregator_mainwindow setHidden false else akregator "$@" fi -==--==--==--==--==- goakregator -==--==--==--==--==--==- I had to change the desktop icon to disable the launch feedback, since for reasons I don't understand, when making a running (and trayed, presumably) instance visible (as opposed to launching a new instance when none is already running), the cursor animation is activated and a spurious taskbar tab created until the timeout, after which the animation terminates and the taskbar tab is removed. With launch feedback disabled, none of those spurious visual effects occur. The launch feedback checkbox is part of the "Advanced Options" dialog in the Application tab of the desktop icon's Properties dialog. Of course, the command name in the desktop icon must be changed from "akregator" to "goakregator" (the script shown above) and that script must be in $PATH.
... Jonas Helgi Palsson
Randall Schulz
participants (2)
-
Jonas Helgi Palsson
-
Randall R Schulz