[WIP] A bash tool to read/write in tsv like db files.
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.
 
 

30 lines
1.1 KiB

#!/usr/bin/env bash
_nesto_dir="$(dirname $(readlink -f $0))"
source "$_nesto_dir/types.sh"
Array clock_anim=(🕐 🕑 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 🕛 🕜 🕝 🕞 🕟 🕠 🕡 🕢 🕣 🕤 🕥 🕦 🕧)
Map status_icons=([running]=⚫ [stopped]=⚪ [template]="☢️ " [other]="✔️☑️🔘⚪⚫🔴🔵🔺🔻🔸🔹🔶🔷🔳🔲▪️▫️◾◽◼️⬛⬜☢️📻⏰⌛️⏳📡🔋🔌💡💰🔧🔑✉️📩📨📧💌📥📤📦📜📃📄📑📊📈📉📆📅📇📋📁📂📰📓📔📚📖🔖🔗📎📐📏📌📍📝🔍🔎🔏🔐🔒🔓🎭🎨🎬🎤🎧🎼🎹🎷🎺🎸🎻🎲♟🎯🎮🔈🔇🔉🔊🔔🔕📣📢💬💭♠️♣️♥️♦️" )
Map status_colors=([running]=$c_green [stopped]=$c_dark$c_red [template]=$c_yellow )
spinning=""
s=1
spinner()
{
s=$[$s+1]
local i=$[$s%100]
if [[ -n $spinning ]]
then
if [[ $i == 0 ]]
then
printf "${clock_anim[$1]} $s\r"
[[ $1 < ${#clock_anim[@]} ]] && spinner $[$1+1] || spinner 1
else
spinner $1
fi
fi
}
spinning=true
spinner