My dotfiles. Period.

colors.bashrc 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #!/bin/bash
  2. # get some fancy colorz
  3. BASHUM_COLOR_BLACK=$'\033[0;30m'
  4. BASHUM_COLOR_RED=$'\033[0;31m'
  5. BASHUM_COLOR_GREEN=$'\033[0;32m'
  6. BASHUM_COLOR_YELLOW=$'\033[0;33m'
  7. BASHUM_COLOR_BLUE=$'\033[0;34m'
  8. BASHUM_COLOR_MAGENTA=$'\033[0;35m'
  9. BASHUM_COLOR_CYAN=$'\033[0;36m'
  10. BASHUM_COLOR_WHITE=$'\033[0;37m'
  11. BASHUM_COLOR_LBLACK=$'\033[1;30m'
  12. BASHUM_COLOR_LRED=$'\033[1;31m'
  13. BASHUM_COLOR_LGREEN=$'\033[1;32m'
  14. BASHUM_COLOR_LYELLOW=$'\033[1;33m'
  15. BASHUM_COLOR_LBLUE=$'\033[1;34m'
  16. BASHUM_COLOR_LMAGENTA=$'\033[1;35m'
  17. BASHUM_COLOR_LCYAN=$'\033[1;36m'
  18. BASHUM_COLOR_LWHITE=$'\033[1;37m'
  19. BASHUM_COLOR_NORMAL=$'\033[1;0m'
  20. # get some fancy colorz
  21. BASHUM_PS_COLOR_BLACK=$'\[\033[0;30m\]'
  22. BASHUM_PS_COLOR_RED=$'\[\033[0;31m\]'
  23. BASHUM_PS_COLOR_GREEN=$'\[\033[0;32m\]'
  24. BASHUM_PS_COLOR_YELLOW=$'\[\033[0;33m\]'
  25. BASHUM_PS_COLOR_BLUE=$'\[\033[0;34m\]'
  26. BASHUM_PS_COLOR_MAGENTA=$'\[\033[0;35m\]'
  27. BASHUM_PS_COLOR_CYAN=$'\[\033[0;36m\]'
  28. BASHUM_PS_COLOR_WHITE=$'\[\033[0;37m\]'
  29. BASHUM_PS_COLOR_LBLACK=$'\[\033[1;30m\]'
  30. BASHUM_PS_COLOR_LRED=$'\[\033[1;31m\]'
  31. BASHUM_PS_COLOR_LGREEN=$'\[\033[1;32m\]'
  32. BASHUM_PS_COLOR_LYELLOW=$'\[\033[1;33m\]'
  33. BASHUM_PS_COLOR_LBLUE=$'\[\033[1;34m\]'
  34. BASHUM_PS_COLOR_LMAGENTA=$'\[\033[1;35m\]'
  35. BASHUM_PS_COLOR_LCYAN=$'\[\033[1;36m\]'
  36. BASHUM_PS_COLOR_LWHITE=$'\[\033[1;37m\]'
  37. BASHUM_PS_COLOR_NORMAL=$'\[\033[1;0m\]'
  38. #shellcheck disable=SC1087
  39. bashum__colordemo() {
  40. local bla=$BASHUM_COLOR_BLACK
  41. local red=$BASHUM_COLOR_RED
  42. local gre=$BASHUM_COLOR_GREEN
  43. local yel=$BASHUM_COLOR_YELLOW
  44. local blu=$BASHUM_COLOR_BLUE
  45. local mag=$BASHUM_COLOR_MAGENTA
  46. local cya=$BASHUM_COLOR_CYAN
  47. local whi=$BASHUM_COLOR_WHITE
  48. local lbla=$BASHUM_COLOR_LBLACK
  49. local lred=$BASHUM_COLOR_LRED
  50. local lgre=$BASHUM_COLOR_LGREEN
  51. local lyel=$BASHUM_COLOR_LYELLOW
  52. local lblu=$BASHUM_COLOR_LBLUE
  53. local lmag=$BASHUM_COLOR_LMAGENTA
  54. local lcya=$BASHUM_COLOR_LCYAN
  55. local lwhi=$BASHUM_COLOR_LWHITE
  56. local n=$BASHUM_COLOR_NORMAL
  57. echo "black: $bla[abc123]$n lblack: $lbla[abc123]$n"
  58. echo "red: $red[abc123]$n lred: $lred[abc123]$n"
  59. echo "yellow: $yel[abc123]$n lyellow: $lyel[abc123]$n"
  60. echo "green: $gre[abc123]$n lgreen: $lgre[abc123]$n"
  61. echo "cyan: $cya[abc123]$n lcyan: $lcya[abc123]$n"
  62. echo "blue: $blu[abc123]$n lblue: $lblu[abc123]$n"
  63. echo "magenta: $mag[abc123]$n lmagenta: $lmag[abc123]$n"
  64. echo "white: $whi[abc123]$n lwhite: $lwhi[abc123]$n"
  65. }