~scripts
58 itemsDownload ./*

58 itemsDownload ./*

..
display
dzen2
nginx
tiling
vosh
4cdl
4trips
alarm
ambient
battery-monitor
checkit
cleverbot.py
clock
color-gen
colors-hex
colorscheme.sh
compton.sh
dailywall
dmenu
ffthumb
grid
gridmacro
gridmacro.kde
help
importw
indexer
install-all.sh
install-twily.sh
installng
mp3ogg
netspeed.sh
orage
pipes
pipes.x
pipewire_bt.sh
ports
rain
randwall
readystart.sh
rotate.sh
scan.sh
screencast
screencast2
scrot
scrotw
search
skull
slocker
startblender.sh
starwars
streamit
sumnum
synctimedate.sh
tty-colorize
usrmount
ytp
ytplay
zombie-restart.sh


scriptsclock
3 878•  10 years ago•  DownloadRawClose
10 years ago•  3 878

{}
#!/bin/bash
#
# Author: Twily     2014
#

unhide_cursor() { printf "\e[?25h"; }
trap unhide_cursor EXIT

STRW=`expr 6 \* 3 + 2`  # String length "00:00:00" in character blocks produced by toilet font
STRH=3                  # String height "00:00:00" in character blocks produced by toilet font
SPACEW=3                # "Space" length in character block produced by toilet font

# This will center the clock, but resizing will leave artifacts
function center {
    TW=`tput -S <<< cols`
    TH=`tput -S <<< lines`

    A1=`expr $TH - $STRH`
    A1=`expr $A1 / 2`
    A2=`expr $TW - $STRW`
    A2=`expr $A2 / 2`
    A2=`expr $A2 / $SPACEW`
}

clear
center
printf "\e[?25l"
while true; do
    printf "\033[;H"

    B2=""
    for i in `seq 1 $A1`; do echo ""; done
    for i in `seq 1 $A2`; do B2="$B2 "; done

    toilet -f future -t --g <<< "$B2`date +'%H:%M:%S'`"
    sleep .1
done

Top
©twily.info 2013 - 2024
twily at twily dot info



2 175 655 visits
... ^ v