bunkdeck/proclaim

35 lines
1.1 KiB
Text
Raw Normal View History

#!/bin/sh -e
2024-02-09 20:13:25 +00:00
# make username uppercase
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
timezone=UTC
chatlog=/var/log/bunkchat/chat.log
prompt=""
2024-02-09 20:13:25 +00:00
makeSlug () {
# make time and date
time=$(TZ=${timezone} date +%I:%M%p)
date=$(TZ=${timezone} date +%m/%d)
2024-02-09 20:13:25 +00:00
# make name/time string
prompt="${username}-${date}-${time}"
2024-02-09 20:13:25 +00:00
}
# enter bunkchat mode (clear the screen)
clear
while true
do
echo "┏━┓┏━┓┏━┓┏━╸╻ ┏━┓╻┏┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸"
echo "┣━┛┣┳┛┃ ┃┃ ┃ ┣━┫┃┃┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ "
echo "╹ ╹┗╸┗━┛┗━╸┗━╸╹ ╹╹╹ ╹ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ "
2024-04-13 23:36:15 +00:00
echo "You may view current chat with 'heed'!"
echo "You may view old chat with 'scry'!"
echo "----------------------------------"
2024-04-13 18:48:32 +00:00
printf "speak to the server: "
read -r text
makeSlug
echo "${prompt}: $text" >> $chatlog
clear
2024-02-09 20:13:25 +00:00
done