Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # ~/.bashrc
- #
- ## Referensi: https://misc.flogisoft.com/bash/tip_colors_and_formatting
- ## Font: https://github.com/xero/figlet-fonts
- ####### Color Variabel ######
- red='\e[31m'
- blue='\e[34m'
- bgblue='\e[44m'
- bold='\e[1m'
- underline='\e[4m'
- ####### End Color Variabel #####
- ############ Edit Script #############
- jam=`date +%H`
- if [ $jam -ge 03 -a $jam -le 6 ]
- then
- panggil="\e[32mMorning $bold$underline$(whoami)\e[0m, wake up friend $blue:o\e[0m" ##$(hostname) bisa diganti dengan peintah" linux.
- elif [ $jam -ge 7 -a $jam -le 12 ]
- then
- panggil="\e[34mCome on $bold$underline$(whoami)\e[0m, time to work $blue:D\e[0m"
- elif [ $jam -ge 12 -a $jam -le 13 ]
- then
- panggil="\e[36mHallo $(whoami), don't forget to sholat \e[33m:)\e[0m"
- elif [ $jam -ge 13 -a $jam -le 16 ]
- then
- panggil="\e[34mThere's still work $(whoami), finish it \e[33m-_-\e[0m"
- elif [ $jam -ge 16 -a $jam -le 18 ]
- then
- panggil="\e[38mFinish, let's go home $(whoami) \e[33m:D\e[0m"
- else
- panggil="\e[30mGood night $(whoami) \e[33m+_+zzZ\e[0m"
- fi
- #Edited
- if [ "$(whoami)" != "root" ]
- then
- namamu="$blue$(hostname)\e[39m"
- else
- namamu="$red$(hostname)\e[39m"
- fi
- if [ -f /etc/bash_completion ] && ! shopt -oq posix;
- then
- . /etc/bash_completion
- fi
- echo -ne $blue
- figlet -f slant "IT-SecuritY"
- echo -e "\e[0mWelcome to \e[5m$namamu\e[0m," ## \e[0m adalah syntax warna atau tag tutup dan \e[5m kode untuk blink
- echo -e "$panggil";
- #echo -e "$(uname -sr)\e[0m";
- echo -e $bgblue`date`"\e[0m";
- ######## End Edit Script #############
- # If not running interactively, don't do anything
- [[ $- != *i* ]] && return
- alias ls='ls --color=auto'
- PS1='[\u@\h \W]\$ '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement