1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
common-configs/xscreensaver/fortune-wrapper.sh

12 lines
280 B

#!/bin/bash
while true; do
FORTUNE=$(fortune -ce /usr/share/games/fortunes)
SOURCE=$(sed '1s/(\(.*\))/\1/;q' <<<"$FORTUNE")
TEXT=$(tail +3 <<<"$FORTUNE")
printf '\033[2J\033[H'
echo '['"$SOURCE"']'
sleep 2s
echo -n "$TEXT"
sleep $(( (${#TEXT} / 20) + 10 ))s
done