[Konsole-devel] Re: About a konsole feature
Waldo Bastian
bastian at kde.org
Wed Jul 3 17:49:29 UTC 2002
On Wednesday 03 July 2002 04:10 am, Taliver Heath wrote:
> I was thinking about writing a small app, basically a tiny detachable
> window that had the monitor status of all the windows on the konsole, so
> you could watch it in another virtual screen.
>
> I have yet to start going through the konsole code, so i was wondering if
> you had any ideas on how to start.
You could add some dcop functions to konsole so that another application can
ask konsole to inform it when some activity happens.
Something like:
void setDcopActivityNotificationEnabled(bool b);
and when that is enabled you could emit a DCOP signal from konsole like:
void konsoleSessionActive(DCOPRef session)
whenever something happens.
You must probably do some filtering so that you don't send signals for every
byte received, but at most once a second or so. Or alternatively, you could
use
void konsoleSessionActive(DCOPRef session, bool active)
that you emit with active=true when activity is detected, and that you emit
with active=false when no activity has been detected for e.g. 5 seconds.
Then the monitoring application needs to connect to this signal.
Suggested reading:
kdelibs/dcop/HOWTO
kdelibs/dcop/client/README.dcop
Cheers,
Waldo
--
bastian at kde.org | SuSE Labs KDE Developer | bastian at suse.com
More information about the konsole-devel
mailing list