A collection of scripts and configurations for Bash (and others)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
795B

  1. _CC() {
  2. local f="39"
  3. local b="49"
  4. local s="0"
  5. if [ "$1" ]; then
  6. f="${1}"
  7. fi
  8. if [ "$2" ]; then
  9. b="${2}"
  10. fi
  11. if [ "$3" ]; then
  12. s="${3}"
  13. fi
  14. echo -n "\[\e[${s};${f};${b}m\]"
  15. }
  16. _CFG() {
  17. local f="39"
  18. if [ "$1" ]; then
  19. f="${1}"
  20. fi
  21. echo -n "\[\e[${f}m\]"
  22. }
  23. DEFAULT='39'
  24. BLACK='30'
  25. RED='31'
  26. GREEN='32'
  27. YELLOW='33'
  28. BLUE='34'
  29. PURPLE='35'
  30. CYAN='36'
  31. GREY='37'
  32. DGREY='90'
  33. LRED='91'
  34. LGREEN='92'
  35. LYELLOW='93'
  36. LBLUE='94'
  37. LPURPLE='95'
  38. LCYAN='96'
  39. WHITE='97'
  40. BG_DEFAULT='49'
  41. BG_BLACK='40'
  42. BG_RED='41'
  43. BG_GREEN='42'
  44. BG_YELLOW='43'
  45. BG_BLUE='44'
  46. BG_PURPLE='45'
  47. BG_CYAN='46'
  48. BG_GREY='47'
  49. BG_DGREY='100'
  50. BG_LRED='101'
  51. BG_LGREEN='102'
  52. BG_LYELLOW='103'
  53. BG_LBLUE='104'
  54. BG_LPURPLE='105'
  55. BG_LCYAN='106'
  56. BG_WHITE='107'
  57. NORMAL="\[\033[0m\]"
  58. CLEAR=$(_CFG $DEFAULT)