Bug 244015 - Option to auto-cycle through tabs with active conversation when idle
Summary: Option to auto-cycle through tabs with active conversation when idle
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.2.3
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 11:09 UTC by Michael Spencer
Modified: 2010-07-12 23:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Spencer 2010-07-09 11:09:56 UTC
Version:           1.2.3 (using KDE 4.4.2) 
OS:                Linux

I have a 3 monitor setup with IRC running constantly on one monitor driven by a separate computer from the other two. The mouse to this computer is often inconvenient to switch to, so it is difficult to constantly check other active channels in IRC to see if there is anything to reply to.

It would be nice to have a feature that automatically cycles through tabs with "active" conversation when you are "idle". (I don't have a good definition for active or idle yet).

If no one is interested in implementing this feature, I would like to implement it for myself anyway. So any information on that front would be appreciated.

Reproducible: Didn't try
Comment 1 Eike Hein 2010-07-09 21:56:04 UTC
Konversation has a "Next Active Tab" keyboard shortcut, by default Ctrl+Alt+Space, that will go through tabs in chronological order, tiered by notification priority (i.e. first all nick highlights, then all highlights, then all regular messages, ...). I suggest you set up something externally that triggers this action periodically, e.g. use xdotool or xvkbd to send Ctrl+Alt+Space to the Konversation window. You could possibly wrap that up in a KDE/X11 screensaver so it runs when idle (I think the screensaver system ignores fake XTEST keyboard events like those generated by xdotool or xvkbd). Sound good?
Comment 2 Michael Spencer 2010-07-09 23:23:21 UTC
That sounds good. Is there a portable way (dbus or some KDE API) to get the keyboard shortcut? Not that important, but would be nice.
Comment 3 Eike Hein 2010-07-09 23:37:57 UTC
Nope, only for global keyboard shortcut I think. Actually - I don't know the details, but I think KDE 4,5 has a D-Bus API somewhere to trigger global shortcuts, so if you gave the action a global hotkey ...
Comment 4 Michael Spencer 2010-07-12 08:46:07 UTC
I tried this out and there's a slight problem. Ctrl+Alt+Space will only visit tabs that have had activity since the last time they were visited. I need it to visit tabs even if there has not been activity since the last time it switched, but there has been activity recently.

The main reason for this is that I sit in quite a few "help" channels and want it to cycle through them even if someone asked a question and no one has replied yet.

I've taken a look at the source code and it seems that I could do what I want if getJoinedChannelList and {get,set}ForegroundChannel were added to the dbus API.
Comment 5 Eike Hein 2010-07-12 17:57:43 UTC
I can think of another hack: Konversation raises the tab for an already joined channel if you try to join it again. IOW, for channels you know you're in, you can abuse the D-Bus "say" method to send "/join #channel" commands ro raise a particular tab. That way you can externally cycle between a defined set of channels. If you want to do it conditional on recent activity, you can look at the last timestamp in the channel log.
Comment 6 Michael Spencer 2010-07-12 19:53:37 UTC
That's one dirty hack, but will work for now.

Do you think there would be any objection to a patch that adds the aforementioned D-Bus methods to org.kde.konversation and org.kde.konversation.MainWindow respectfully?

Although for getJoinedChannelList it may make more sense to instead have objects under /irc/Servers/<server-name>/Channels. So that one could query information from them (like the last time stamp).
Comment 7 Eike Hein 2010-07-12 22:04:22 UTC
Seems a bit haphazard to me to add APIs that only concern themseves with listing channels and raising channel tabs, considering there are also many other types of tabs that his wouldn't cover. Considering we need to keep such APIs around for a long time, something that's a bit more comprehensive and better designed would seem to be in order. Work along those lines is of course very welcome.
Comment 8 Michael Spencer 2010-07-12 23:13:36 UTC
Thanks for all your help with this. I'll post to konversation-devel@kde.org for further discussion once I get a comprehensive plan and partial implementation going.
Comment 9 Eike Hein 2010-07-12 23:16:52 UTC
Very cool, thanks. I'll close this for now.