mirror of
https://github.com/iAmInActions/random-scripts.git
synced 2024-11-21 19:40:12 +00:00
Add birbfetch
A tiny neofetch clone for the MCL operating system.
This commit is contained in:
parent
f43fcc1013
commit
c25e0922f9
9
birbfetch/README
Normal file
9
birbfetch/README
Normal file
@ -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.
|
49
birbfetch/birbfetch
Normal file
49
birbfetch/birbfetch
Normal file
@ -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"
|
BIN
birbfetch/birbfetch.tgz
Normal file
BIN
birbfetch/birbfetch.tgz
Normal file
Binary file not shown.
8
birbfetch/fetchart
Normal file
8
birbfetch/fetchart
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[33m _, ____ __
|
||||||
|
,-''- /'\_/`\/\ _`\ /\ \
|
||||||
|
[32m-[33m.' [34m#[33m '[34m#[33m\ /\ \ \ \/\_\\ \ \
|
||||||
|
[32m:[33m ' [34m##[33m|[34m #[33m: \ \ \__\ \ \ \/_/_\ \ \ __
|
||||||
|
[32m\[33m-| /',' \ \ \_/\ \ \ \L\ \\ \ \L\ \
|
||||||
|
.[32m| [33m/[34m##[33m,'[32m\[33m \ \_\\ \_\ \____/ \ \____/
|
||||||
|
')[32m',[34m#[33m: [32m| [33m\/_/ \/_/\/___/ \/___/
|
||||||
|
.' ''[32m '''[33m [33mWhen size DOES matter.
|
8
birbfetch/fetchart-alt
Normal file
8
birbfetch/fetchart-alt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
_, ____ __
|
||||||
|
,-''- /'\_/`\/\ _`\ /\ \
|
||||||
|
.' ' \ /\ \ \ \/\_\\ \ \
|
||||||
|
' | : \ \ \__\ \ \ \/_/_\ \ \ __
|
||||||
|
\-| /',' \ \ \_/\ \ \ \L\ \\ \ \L\ \
|
||||||
|
.| / ,' \ \_\\ \_\ \____/ \ \____/
|
||||||
|
')',.: \/_/ \/_/\/___/ \/___/
|
||||||
|
.' '' When size DOES matter.
|
Loading…
Reference in New Issue
Block a user