This commit is contained in:
Dionysus 2024-02-16 15:00:55 -05:00
parent b7acf4c4eb
commit 3ce4b3977e
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
4 changed files with 43 additions and 9 deletions

View File

@ -2,7 +2,6 @@
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export GOPATH=$HOME/dev/go
export GPG_TTY=$(tty)
export PATH=$HOME/.local/bin:$PATH

8
incus
View File

@ -1,8 +0,0 @@
xbps-install incus incus-client
ln -s /etc/sv/incus /var/service
ln -s /etc/sv/incus-user /var/service
sv up incus
sv up incus-user
xbps-install runit-iptables

27
scripts/motd.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/sh
cat super.txt
DISTRO_VERSION=$(cat /etc/os-release | grep PRETTY_NAME | cut -d= -f2 | tr -d '"')
ARCH=$(uname -m)
CPU_NAME=$(lscpu | grep "Model name" | cut -d: -f2 | sed -e 's/^[[:space:]]*//')
CPU_COUNT=$(lscpu | grep "Socket(s):" | cut -d: -f2 | sed -e 's/^[[:space:]]*//')
THREAD_COUNT=$(lscpu | grep -E '^Socket\(s\)|^Core\(s\) per socket|^Thread\(s\) per core' | awk '{print $NF}' | tr '\n' ' ' | awk '{print $1 * $2 * $3}')
TOTAL_RAM=$(free | grep Mem | awk '{printf "%.2f GB\n", $2/1024/1024}')
DISK_USAGE=$(df -h "$(pwd)" | awk 'NR==2 {print $3"B / "$2"B"}')
CPU_INFO="${CPU_COUNT}x ${CPU_NAME} with ${THREAD_COUNT} threads each"
DARK_GREY='\033[0;90m'
CYAN='\033[0;36m'
NO_COLOR='\033[0m'
SEP="${DARK_GREY}${NO_COLOR}"
echo ""
echo "┏┓┳┳┏┓┏┓┳┓ ${CYAN}Hostname${NO_COLOR} ${DARK_GREY}${NO_COLOR} $(cat /etc/hostname)"
echo "┗┓┃┃┃┃┣ ┣┫ ${CYAN}Build${NO_COLOR} ${DARK_GREY}${NO_COLOR} $DISTRO_VERSION ($ARCH)"
echo "┗┛┗┛┣┛┗┛┛┗ ${CYAN}CPU${NO_COLOR} ${DARK_GREY}${NO_COLOR} $CPU_INFO"
echo "┳┓┏┓┏┳┓┏┓ ${CYAN}RAM${NO_COLOR} ${DARK_GREY}${NO_COLOR} $TOTAL_RAM"
echo "┃┃┣ ┃ ┗┓ ${CYAN}DISK${NO_COLOR} ${DARK_GREY}${NO_COLOR} $DISK_USAGE"
echo "┛┗┗┛ ┻ ┗┛ ${CYAN}IP${NO_COLOR} ${DARK_GREY}${NO_COLOR} $(curl -s https://4.icanhazip.com)"
echo ""

16
scripts/super.txt Normal file
View File

@ -0,0 +1,16 @@