.
Thanks for your responses, klaus2008.

nmcli is probably part of the solution; I'll study up on that.

I should have indicated keyboard and/or mouse events as an indication or
lack of user presence or attention to internet events.

I think 'a small time' might be some random number between 15 and 30 minutes
as a starting point.

If I know I'm not going to use Knoppix for a while, I manually disconnect.
If I'm interrupted, I might forget to do this; I'd like Linux to disconnect
automatically, if need be. Solution need not consider re-connect, since that's
easy enough to do manually with the NM panel applet.

You can't underestimate my programming prowess. At most I may be able to
figure out a line of bash script. I wouldn't have a prayer with C/C+/or C++
source, even if I had it to look at.