pull down to refresh

Not specifically for Raspiblitz, but inspired by it. I have this. I'm quite proud of it :)
#!/bin/bash

# Set Colors
YELLOW='\033[0;93m'
WHITE='\033[1;37m'
GREEN='\033[0;32m'
LGRAY='\033[0;37m'
DGRAY='\033[1;30m'
PURPLE='\033[0;35m'
RED='\033[0;31m'

# Utility Strings
HORZLINE="-----------------------------------------------------------------------"
HEADLINE="Digital, Decentralized, Peer to Peer"
DATETIME=$(date -R)

# Get System Info
CPUTEMP=$(</sys/class/thermal/thermal_zone0/temp)
TEMPC="$((CPUTEMP/1000))"
OSVERSION=$(head -1 /etc/os-release | grep -oP "(?<=\").*(?=\")")
HDDUSED=$(df -h | grep "/dev/sda1" | sed -e's/  */ /g' | cut -d" " -f 3 2>/dev/null)
HDDPCT=$(df -h | grep "/dev/sda1" | sed -e's/  */ /g' | cut -d" " -f 5 | tr -dc '0-9' 2>/dev/null)
RAMTOT=$(free -m | grep Mem | awk '{ print $2 }')
RAMFREE=$(free -m | grep Mem | awk '{ print $7 }')
LOCALIP=$(hostname -I | awk '{print $1}')

# Temperature Colors
if [ "$TEMPC" -lt "60" ]; then
  TEMPCOLOR="$GREEN"
elif [ "$TEMPC" -lt "75" ]; then
  TEMPCOLOR="$YELLOW"
else
  TEMPCOLOR="$RED"
fi

# Bitcoin Info
BTCVER=$(bitcoin-cli -version 2>/dev/null | head -1 | cut -d ' ' -f6)
BTCPEERS=$(bitcoin-cli getnetworkinfo | grep "connections\"" | tr -cd '[[:digit:]]')
BTCBLOCKS=$(bitcoin-cli getblockchaininfo | jq -r '.blocks')
BTCSYNC=$(bitcoin-cli getblockchaininfo | jq -r '.verificationprogress' | awk '{printf( "%.2f", 100 * $1)}')
BTCLOGOUTPUT=$(tail -1 /home/bitcoin/.bitcoin/debug.log)
BTCADDR=$(bitcoin-cli getnetworkinfo | jq -r '.localaddresses [0] .address')
BTCPORT=$(bitcoin-cli getnetworkinfo | jq -r '.localaddresses [0] .port')
LNWALBAL=$(lncli walletbalance | jq -r '.total_balance')
LNOUTBAL=$(lncli channelbalance | jq -r '.local_balance.sat')
LNINBAL=$(lncli channelbalance | jq -r '.remote_balance.sat')
LNDLOGOUTPUT=$(tail -1 /home/lnd/.lnd/logs/bitcoin/mainnet/lnd.log)

# Status Screen
printf "    \n\n\n\n\n\n"
printf "    ${YELLOW}                 Bitcoin Core ${BTCVER}               ${GREEN}${HEADLINE}\n"
printf "    ${YELLOW}    @@  @@       ${LGRAY}%s\n" "${HORZLINE}"
printf "    ${YELLOW}  @@@@@@@@@      ${LGRAY}Refreshed: ${DATETIME}    Local IP: ${LOCALIP}\n"
printf "    ${YELLOW}    @@     @@    ${LGRAY}Mem Free: ${GREEN}${RAMFREE}M / ${RAMTOT}M  ${LGRAY}HDD Used: ${GREEN}${HDDUSED} (${HDDPCT}%%)  ${LGRAY}CPU Temp: ${TEMPCOLOR}${TEMPC}°C\n"
printf "    ${YELLOW}    @@     @@    ${LGRAY}Bitcoin mainnet: ${GREEN}${BTCPEERS} ${LGRAY}peers ${GREEN}${BTCBLOCKS} ${LGRAY}blocks ${GREEN}(${BTCSYNC}%%)\n"
printf "    ${YELLOW}    @@@@@@@@     ${LGRAY}Electrum server: ${GREEN}ssl://${LOCALIP}:50002\n"
printf "    ${YELLOW}    @@     @@    ${LGRAY}Lightning network: wallet ${GREEN}${LNWALBAL} ${LGRAY}local ${GREEN}${LNOUTBAL} ${LGRAY}remote ${GREEN}${LNINBAL}\n"
printf "    ${YELLOW}    @@     @@    \n"
printf "    ${YELLOW}  @@@@@@@@@@     ${LGRAY}                 Unequal weights and unequal measures\n"
printf "    ${YELLOW}    @@   @@      ${LGRAY}              are both alike an abomination to the LORD.\n"
printf "    ${YELLOW}                 ${LGRAY}                          -- Proverbs 20:10\n"
printf "\n\n\n\n\n\n\n\n"
printf "${DGRAY}${BTCLOGOUTPUT}\n"
printf "${DGRAY}${LNDLOGOUTPUT}\n"
Okay I could not resist. Lifted your ascii design, hope you don't mind 🫶
reply
No problem, spread the ❤️
reply
"There are many like it, but this one is mine."
reply