~scripts
55 itemsDownload ./*

55 itemsDownload ./*

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


scriptsclock
3 636•  9 years ago•  DownloadRawClose
9 years ago•  3 636

{}
#!/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 034 041 visits
... ^ v