#!/usr/bin/env wish # Simple Tk script to create a button that prints one fortune cookie # from package fortune-cs # Click on the button or use standard key shortcuts to close the window # (the command itself having already terminated, perhaps). # # RCS: @(#) $Id: fortune-cs.tk,v 2.0 2006/05/05 09:00:00 zp&mk Exp $ # # The first line below creates the button, and the second line asks the # packer to shrink-wrap the application's main window around the button. #encoding system utf-8 #just try it button .fortune -text [exec /usr/bin/fortune cs] button .fortune -justify left -text [exec /etc/profile.d/x-fortune-cs.sh] \ -command { destroy . } pack .fortune bind . {destroy .} bind . {destroy .}