Created
June 21, 2020 00:06
-
-
Save Shugabuga/59791374288878ea4d9cfe2f4b94006e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Lightweight MOTD script by Shuga. Licensed under CC-0. | |
SHUGA_MACHINE_NAME=Senko | |
SHUGA_MACHINE_ICON=🦊 | |
SHUGA_MACHINE_COLOR="2;239;144;19m" | |
PS1="\033[48;$SHUGA_MACHINE_COLOR $SHUGA_MACHINE_ICON\033[38;2;0;0;0m \w\[ \033[00m\]\033[38;$SHUGA_MACHINE_COLOR""\033[00m\] " | |
echo -e "$SHUGA_MACHINE_ICON\033[38;$SHUGA_MACHINE_COLOR Welcome to $SHUGA_MACHINE_NAME!\033[0m" | |
echo -e " \033[38;2;115;144;196mConnected to $(dig -4 +short myip.opendns.com @resolver1.opendns.com).\033[0m" | |
echo -e " \033[38;2;115;144;196mUptime: $(uptime -p)\033[0m" | |
echo -e " \033[38;2;115;144;196mMemory: \033[38;2;115;144;196m$(free -m | awk 'NR==2{printf "%s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }')\033[0m" | |
echo -e " \033[38;2;115;144;196mDisk: $(df -h | awk '$NF=="/"{printf "%d/%dGB (%s)\n", $3,$2,$5}')\033[0m" | |
echo -e " \033[38;2;115;144;196mCPU: $(top -bn1 | grep load | awk '{printf "%.2f\n", $(NF-2)}' )\033[0m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment