Richard Suchenwirth - Here's a minimalist first shot - black screen, mouse pointer still visible, no animation. Vanishes on keypress, button press, or mouse motion. BUG?: does not hide task bar when run under NT -- does when on Sun via Reflection under NT!
proc screensaver {w} { destroy $w ;# just to make sure toplevel $w -bg black wm overrideredirect $w 1 wm geometry $w [winfo screenwidth $w]x[winfo screenheight $w]+0+0 focus $w ;# so it gets keypresses bind $w <Key> [list destroy $w] bind $w <Button> [list destroy $w] bind $w <Motion> [list destroy $w] return $w }
Unix/X only (and you need to have a screensaver installed - it works for me on CDE...) DKF
exec xset s activate
RS: Sure, but the idea was to have a Tk widget in which to insert the real fun animations, or whatever, in Tcl ;-)
Also see Rolf Schroedter's screensaver example using ffidl.
From: Bag of Tk algorithms - Arts and crafts of Tcl-Tk programming