Advertisement
yonata21

ArchConsole

Oct 3rd, 2019
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.71 KB | None | 0 0
  1. #
  2. # ~/.bashrc
  3. #
  4.  
  5.  
  6. ## Referensi: https://misc.flogisoft.com/bash/tip_colors_and_formatting
  7. ## Font: https://github.com/xero/figlet-fonts
  8.  
  9. ####### Color Variabel ######
  10. red='\e[31m'
  11. blue='\e[34m'
  12. bgblue='\e[44m'
  13. bold='\e[1m'
  14. underline='\e[4m'
  15. ####### End Color Variabel #####
  16.  
  17. ############ Edit Script #############
  18. jam=`date +%H`
  19. if [ $jam -ge 03 -a $jam -le 6 ]
  20. then
  21.         panggil="\e[32mMorning $bold$underline$(whoami)\e[0m, wake up friend $blue:o\e[0m" ##$(hostname) bisa diganti dengan peintah" linux.
  22. elif [ $jam -ge 7 -a $jam -le 12 ]
  23. then
  24.         panggil="\e[34mCome on $bold$underline$(whoami)\e[0m, time to work $blue:D\e[0m"
  25. elif [ $jam -ge 12 -a $jam -le 13 ]
  26. then
  27.         panggil="\e[36mHallo $(whoami), don't forget to sholat \e[33m:)\e[0m"
  28. elif [ $jam -ge 13 -a $jam -le 16 ]
  29. then
  30.         panggil="\e[34mThere's still work $(whoami), finish it \e[33m-_-\e[0m"
  31. elif [ $jam -ge 16 -a $jam -le 18 ]
  32. then
  33.         panggil="\e[38mFinish, let's go home $(whoami) \e[33m:D\e[0m"
  34. else
  35.         panggil="\e[30mGood night $(whoami) \e[33m+_+zzZ\e[0m"
  36. fi
  37. #Edited
  38. if [ "$(whoami)" != "root" ]
  39. then
  40.         namamu="$blue$(hostname)\e[39m"
  41. else
  42.     namamu="$red$(hostname)\e[39m"
  43. fi
  44.  
  45. if [ -f /etc/bash_completion ] && ! shopt -oq posix;
  46. then
  47.     . /etc/bash_completion
  48. fi
  49. echo -ne $blue
  50. figlet -f slant "IT-SecuritY"
  51. echo -e "\e[0mWelcome to \e[5m$namamu\e[0m," ## \e[0m adalah syntax warna atau tag tutup dan \e[5m kode untuk blink
  52. echo -e "$panggil";
  53. #echo -e "$(uname -sr)\e[0m";
  54. echo -e $bgblue`date`"\e[0m";
  55.  
  56. ######## End Edit Script #############
  57.  
  58. # If not running interactively, don't do anything
  59. [[ $- != *i* ]] && return
  60.  
  61. alias ls='ls --color=auto'
  62. PS1='[\u@\h \W]\$ '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement