diff --git a/.bash_aliases b/.bash_aliases index 7f848f0..921fc0b 100755 --- a/.bash_aliases +++ b/.bash_aliases @@ -86,3 +86,13 @@ alias tootctl='docker exec -it -w /app/www mastodon bin/tootctl' alias hackingtool='docker run -it --net=host --privileged vgpastor/hackingtool' # Do you need to reboot? Find out here! alias needrs='[ -f /var/run/reboot-required ] && echo "You need to reboot"' + +# Countdown Timer +countdown() { + start="$(( $(date '+%s') + $1))" + while [ $start -ge $(date +%s) ]; do + time="$(( $start - $(date +%s) ))" + printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)" + sleep 0.1 + done +}