diff --git a/birbfetch/README b/birbfetch/README new file mode 100644 index 0000000..b8dbdb7 --- /dev/null +++ b/birbfetch/README @@ -0,0 +1,9 @@ +Birbfetch is a tiny neofetch-like program I wrote for my DIY Linux based +operating system MCL (Minki's Crappy Linux). +This script is designed to work on very old versions of the bash interpreter +and can use the busybox internal free command without parameters to parse +RAM data. This allows it to operate on embedded systems without additional +dependencies. Included is also an ASCII art image of MCLs logo. + +If anyone wants to continue the development of this program, feel free to copy +and improve it. Just keep in mind to mention me as the original creator. diff --git a/birbfetch/birbfetch b/birbfetch/birbfetch new file mode 100644 index 0000000..93bb6b9 --- /dev/null +++ b/birbfetch/birbfetch @@ -0,0 +1,49 @@ +#!/bin/bash +################################################################################ +# birbfetch +# +# A tiny neofetch clone made specifically for the MCL 1.2 distribution. +# Regex generated using OpenAIs advanced regex generator aka ChatGPT. +# This program was written by mueller_minki. +# Use at own risk, modify and share if you want. +################################################################################ + +# Define colors +UNIT="\033[1;35m" +NOTE="\033[1;34m" +RESULT="\033[1;32m" +NOCOLOR="\033[0m" + +# Display the ASCII artwork (if file is given display file instead): +if ${1+"false"} +then + if test -f "/etc/fetchart" + then + cat "/etc/fetchart" + echo -n -e "\033[0m" + else + echo "No ASCII art found." + fi +else + cat $1 + echo -n -e "\033[0m" +fi + +# Gather system information: +OS=$(uname -s) +CPU=$(cat /proc/cpuinfo | grep "model name" | sed 's/^[^:]*://' | sed '2,$d') +TOTALRAM=$(free | grep "Mem:" | sed -n 's/[^0-9]*\([0-9]*\).*/\1/p') +USEDRAM=$(free | grep "Mem:" | sed 's/.*[[:space:]]\([0-9]\+\)[[:space:]].*/\1/') +UPTIME=$(uptime | sed -n 's/.* up \([^,]*\),.*/\1/p') +ARCH=$(uname -m) +KERNEL=$(uname -r) + +echo -e "$UNIT-----------------------------------------------------------$NOCOLOR" +echo -e "$RESULT $(whoami)$NOCOLOR$NOTE@$NOCOLOR$RESULT$(hostname)$NOCOLOR" +echo -e "$UNIT ===$NOCOLOR" +echo -e "$NOTE OS:$NOCOLOR$RESULT $OS$NOCOLOR $NOTE($NOCOLOR$RESULT$ARCH$NOCOLOR$NOTE)$NOCOLOR" +echo -e "$NOTE CPU:$NOCOLOR$RESULT$CPU$NOCOLOR" +echo -e "$NOTE Memory:$NOCOLOR $RESULT$TOTALRAM$NOCOLOR$UNIT KiB$NOCOLOR$NOTE Total,$NOCOLOR$RESULT $USEDRAM$NOCOLOR$UNIT KiB$NOCOLOR$NOTE Used.$NOCOLOR" +echo -e "$NOTE Kernel:$NOCOLOR $RESULT$KERNEL$NOCOLOR" +echo -e "$NOTE Uptime:$NOCOLOR $RESULT$UPTIME$NOCOLOR" +echo -e "$UNIT-----------------------------------------------------------$NOCOLOR" diff --git a/birbfetch/birbfetch.tgz b/birbfetch/birbfetch.tgz new file mode 100644 index 0000000..6cbfac3 Binary files /dev/null and b/birbfetch/birbfetch.tgz differ diff --git a/birbfetch/fetchart b/birbfetch/fetchart new file mode 100644 index 0000000..20f09f9 --- /dev/null +++ b/birbfetch/fetchart @@ -0,0 +1,8 @@ + _, ____ __ + ,-''- /'\_/`\/\ _`\ /\ \ + -.' # '#\ /\ \ \ \/\_\\ \ \ + : ' ##| #: \ \ \__\ \ \ \/_/_\ \ \ __ + \-| /',' \ \ \_/\ \ \ \L\ \\ \ \L\ \ + .| /##,'\ \ \_\\ \_\ \____/ \ \____/ + ')',#: | \/_/ \/_/\/___/ \/___/ + .' '' ''' When size DOES matter. diff --git a/birbfetch/fetchart-alt b/birbfetch/fetchart-alt new file mode 100644 index 0000000..ff60375 --- /dev/null +++ b/birbfetch/fetchart-alt @@ -0,0 +1,8 @@ + _, ____ __ + ,-''- /'\_/`\/\ _`\ /\ \ + .' ' \ /\ \ \ \/\_\\ \ \ + ' | : \ \ \__\ \ \ \/_/_\ \ \ __ + \-| /',' \ \ \_/\ \ \ \L\ \\ \ \L\ \ + .| / ,' \ \_\\ \_\ \____/ \ \____/ + ')',.: \/_/ \/_/\/___/ \/___/ + .' '' When size DOES matter.