#!/bin/bash
##############################################################
# Keep alive console thingy for SSH connections that like to #
# kick out after inactivity regardless of settings           #
##############################################################
    # Different throbbers - last defined is used
    # or remove all except the one you want
    T='./^\'                       # Hop-a-long
    T='
.o'                         # throbber
    T='
0123456789-*-9876543210-*-' # counter
    T='
!|!'                        # jumping jacks
    T='
`\,\'                       # bouncing stick
    T='
/%/'                        # pulse
    T='
_-==-'                      # flying
    T='
ooooooo-'                   # wink
    T='
._-`-_'                     # bob-a-long
    T='
._o@o'                      # inflate-deflate
    T='
\|/-'                       # propeller

    sleep='
sleep 1'      # Some "sleep"s only handle integers
    sleep='
usleep 50000' # Some systems can use  "usleep"
    sleep='
sleep 0.2'    # some "sleep"s can handle fp params
 
    for((i=1;i<=${#T};i++)); do
        echo -e '
\033[K\033[1;1H'${T:((i-1)):1}' '"\t"$(date)
        [ $i -eq ${#T} ] && i=0
        $sleep
    done