dotfiles-pub/linux/.local/bin/binaryclock.sh
adryd 422db7b293 Create auto install script for *nix systems
Fix execute permission on shell scripts

Signed-off-by: Cynthia Foxwell <gamers@riseup.net>
2022-04-03 20:43:54 -06:00

18 lines
No EOL
745 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
row0=("" "⠈" "⠐" "⠘" "⠠" "⠨" "⠰" "⠸" "⢀" "⢈")
row1=("⠁" "⠉" "⠑" "⠙" "⠡" "⠩" "⠱" "⠹" "⢁" "⢉")
row2=("⠂" "⠊" "⠒" "⠚" "⠢" "⠪" "⠲" "⠺" "⢂" "⢊")
row3=("⠃" "⠋" "⠓" "⠛" "⠣" "⠫" "⠳" "⠻" "⢃" "⢋")
row4=("⠄" "⠌" "⠔" "⠜" "⠤" "⠬" "⠴" "⠼" "⢄" "⢌")
row5=("⠅" "⠍" "⠕" "⠝" "⠥" "⠭" "⠵" "⠽" "⢅" "⢍")
chars=("${row0[@]}" "${row1[@]}" "${row2[@]}" "${row3[@]}" "${row4[@]}" "${row5[@]}")
hour=$(date +"%H")
minute=$(date +"%M")
second=$(date +"%S")
[[ $hour = 0* ]] && hour=${hour:1:1}
[[ $minute = 0* ]] && minute=${minute:1:1}
[[ $second = 0* ]] && second=${second:1:1}
echo "${chars[$hour]} ${chars[$minute]} ${chars[$second]}"