From c25e0922f91f18656d38bafa5b16410dfb730e6c Mon Sep 17 00:00:00 2001 From: iAmInAction <83808704+iAmInActions@users.noreply.github.com> Date: Sat, 8 Jul 2023 13:24:29 +0000 Subject: [PATCH] Add birbfetch A tiny neofetch clone for the MCL operating system. --- birbfetch/README | 9 ++++++++ birbfetch/birbfetch | 49 ++++++++++++++++++++++++++++++++++++++++ birbfetch/birbfetch.tgz | Bin 0 -> 1280 bytes birbfetch/fetchart | 8 +++++++ birbfetch/fetchart-alt | 8 +++++++ 5 files changed, 74 insertions(+) create mode 100644 birbfetch/README create mode 100644 birbfetch/birbfetch create mode 100644 birbfetch/birbfetch.tgz create mode 100644 birbfetch/fetchart create mode 100644 birbfetch/fetchart-alt 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 0000000000000000000000000000000000000000..6cbfac3cbbf6c4bf84c2c9b7a67c8ca0184e2edb GIT binary patch literal 1280 zcmV+b1^@aViwFR0W2s~S1MOICZ{kJ}zR#BK7xc@NAQ^IC8{1&jRisjau2D#cfT$mE z!a1y3T<-$Z!)r}#6sgK$@4;CeK4eS7?kdV|Lw@A-yOH&l$jt}4bmPU~4 zvG_-}Mpo2FX(ARgu}fHD%XQR&xMRlVqmh;HjO3)5cReDrB7^E0y|0MrxFb0+?BF+R zWQI~?xrWG8&U;Z2bEGj_G=ov(&1fV;+Q`Vna%3V_a?4;Q&aD$SabaX`i$D0~GyriU zrNK27KM<&U(K&P9JM z9h@G68U2i_GfA+q)?*>DCuLJWT=9?Ehr-l$7%BWIAeG0TR8Suh7D9Cj1v&q=QQ-fk zD1b4p?h^n2GM@WT^`J^%<1^ReI5|Y&+~2s48MO2!QiPjQA%*fWiZx*yDI#$#KHBJ1 z0BnUbb8&*0jQIS7nP&>!{!y{C^lXR*TZY`>d=&BG1aM+;zTS9gYKZ&={3)gavBhlv78atOzqKQq!?Z+)gP`7 ztur^x$L)(pW#3P>2NqS*}@(Z^Xe+0u|8PkoHnN9j2DBGvo@diBBU<4 z=ZJI&%LO38b%nc8+4#}ywSL*Gm0K20+r9I4XQK+rf)ED*BT(eYT>bk}Op>~gql|MO zilw``Z@aXdVv77W`6=tguwrTMvygjMeu|5`2S-OoPyNT~pxZYeFha50PgM|sN)N~6 zYjn@6C&!NXG1DFnP(ib{s_pEg2J~G0r;hJ@@$-MZ zVJQ6lPd5y8|NQqB@}knu3oAbvOyXq~5w?|fG8~7k0lrwfNx{~O3N~522Epj82w$wo qYzi`BMKaTYw$xqnWtVgUPuE$#@hxL7d)do3B7XtNXy)$#9smG)jFCS8 literal 0 HcmV?d00001 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.