best kitten entertainment program for Linux?

Mike Kallies mike.kallies-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Jul 14 13:11:52 UTC 2009


Julian C. Dunn wrote:
> I have an amusing request for TLUGgers. My new kitten regards the mouse
> cursor (har-de-har-har) on my Linux box as something worth chasing.
> Although this is irritating while attempting to get some work done, I
> find it extremely entertaining when not.
...


Try this, there are lots of weird extensions, like decimal sleeps,
printf and tput, 80x25 terminal, but it works in my boring Ubuntu
install and it's easy enough that your kitten should be able to fix it :-)

#!/bin/bash

x=20
y=20
xdir=1
ydir=1
width=77
height=23

clear

while [ 1 ]
do
        if [ $x -gt $height ]; then xdir=-1; fi
        if [ $y -gt $width ]; then ydir=-1; fi
        if [ $x -lt 1 ]; then xdir=1; fi
        if [ $y -lt 1 ]; then ydir=1; fi

        tput cup $x $y
        printf "#"

        sleep .05

        tput cup $x $y
        printf " "

        x=$(( x + xdir ))
        y=$(( y + ydir ))


done


--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list