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
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?
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.
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 ...
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.
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.
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).
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.
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.
Very cool, thanks. I'll close this for now.