diff --git a/lambda-00x097.zsh-theme b/lambda-00x097.zsh-theme index b1e2031..5c76cd5 100644 --- a/lambda-00x097.zsh-theme +++ b/lambda-00x097.zsh-theme @@ -2,6 +2,7 @@ autoload colors # use `spectrum_ls` command for getting color scale +export WHITE="251" export GRAY="244" export GREEN="002" export YELLOW="190" diff --git a/make.symlinks.sh b/make.symlinks.sh index e1332c6..ce4d9a3 100644 --- a/make.symlinks.sh +++ b/make.symlinks.sh @@ -3,4 +3,7 @@ ln -s $(pwd)/.bashrc ~/.bashrc ln -s $(pwd)/.bash_profile ~/.bash_profile ln -s $(pwd)/.zshrc ~/.zshrc -ln -s $(pwd)/lambda-00x097.zsh-theme ~/.oh-my-zsh/themes/lambda-00x097.zsh-theme \ No newline at end of file +ln -s $(pwd)/lambda-00x097.zsh-theme ~/.oh-my-zsh/themes/lambda-00x097.zsh-theme + +ln -s $(pwd)/welcome.sh /etc/updated-motd.d/welcome.sh +ln -s $(pwd)/welcome.sh /etc/profile.d/welcome.sh \ No newline at end of file diff --git a/welcome.sh b/welcome.sh new file mode 100755 index 0000000..46c79dd --- /dev/null +++ b/welcome.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +export WHITE="251" +export GRAY="244" +export GREEN="002" +export YELLOW="190" +export RED="196" + +TITLE_COLOR=$GREEN +AT_COLOR=$GRAY +UNDERLINE_COLOR=$GRAY +SUBTITLE_COLOR=$GREEN +COLON_COLOR=$GRAY +INFO_COLOR=$GRAY + +if [[ $EUID -ne 0 ]]; then + TITLE_COLOR=$GREEN + SUBTITLE_COLOR=$GREEN +else + TITLE_COLOR=$RED + SUBTITLE_COLOR=$RED +fi + +neofetch=`neofetch \ + --disk_percent on \ + --memory_percent on \ + --memory_unit gib \ + --cpu_display barinfo \ + --memory_display barinfo \ + --disk_display barinfo \ + --cpu_speed on \ + --cpu_temp C \ + --colors $TITLE_COLOR $AT_COLOR $UNDERLINE_COLOR $SUBTITLE_COLOR $COLON_COLOR $INFO_COLOR +` + +hostName=`uname -n` +diskSpace=`df -Ph | grep xvda1 | awk '{print $4}' | tr -d '\n'` +memoryUsed=`free -t -m | grep Total | awk '{print $3" MB";}'` + +echo " + +$neofetch" + +# - Hostname............: $hostName +# - Disk Space..........: $diskSpace +# - Memory used.........: $memoryUsed \ No newline at end of file