Archlinux basic installation configuration scripts
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.

96 lines
1.9 KiB

  1. #!/usr/bin/env bash
  2. # Color files
  3. PFILE="$HOME/.config/polybar/hack/colors.ini"
  4. RFILE="$HOME/.config/polybar/hack/scripts/rofi/colors.rasi"
  5. # Change colors
  6. change_color() {
  7. # polybar
  8. sed -i -e 's/background = #.*/background = #FFFFFF/g' $PFILE
  9. sed -i -e 's/foreground = #.*/foreground = #1F1F1F/g' $PFILE
  10. sed -i -e "s/primary = #.*/primary = $AC/g" $PFILE
  11. # rofi
  12. cat > $RFILE <<- EOF
  13. /* colors */
  14. * {
  15. al: #00000000;
  16. bg: #FFFFFFFF;
  17. ac: ${AC}FF;
  18. se: ${AC}26;
  19. fg: #1F1F1FFF;
  20. }
  21. EOF
  22. polybar-msg cmd restart
  23. }
  24. if [[ $1 = "--amber" ]]; then
  25. AC="#ffb300"
  26. change_color
  27. elif [[ $1 = "--blue" ]]; then
  28. AC="#1e88e5"
  29. change_color
  30. elif [[ $1 = "--blue-gray" ]]; then
  31. AC="#546e7a"
  32. change_color
  33. elif [[ $1 = "--brown" ]]; then
  34. AC="#6d4c41"
  35. change_color
  36. elif [[ $1 = "--cyan" ]]; then
  37. AC="#00acc1"
  38. change_color
  39. elif [[ $1 = "--deep-orange" ]]; then
  40. AC="#f4511e"
  41. change_color
  42. elif [[ $1 = "--deep-purple" ]]; then
  43. AC="#5e35b1"
  44. change_color
  45. elif [[ $1 = "--green" ]]; then
  46. AC="#43a047"
  47. change_color
  48. elif [[ $1 = "--gray" ]]; then
  49. AC="#757575"
  50. change_color
  51. elif [[ $1 = "--indigo" ]]; then
  52. AC="#3949ab"
  53. change_color
  54. elif [[ $1 = "--light-blue" ]]; then
  55. AC="#039be5"
  56. change_color
  57. elif [[ $1 = "--light-green" ]]; then
  58. AC="#7cb342"
  59. change_color
  60. elif [[ $1 = "--lime" ]]; then
  61. AC="#c0ca33"
  62. change_color
  63. elif [[ $1 = "--orange" ]]; then
  64. AC="#fb8c00"
  65. change_color
  66. elif [[ $1 = "--pink" ]]; then
  67. AC="#d81b60"
  68. change_color
  69. elif [[ $1 = "--purple" ]]; then
  70. AC="#8e24aa"
  71. change_color
  72. elif [[ $1 = "--red" ]]; then
  73. AC="#e53935"
  74. change_color
  75. elif [[ $1 = "--teal" ]]; then
  76. AC="#00897b"
  77. change_color
  78. elif [[ $1 = "--yellow" ]]; then
  79. AC="#fdd835"
  80. change_color
  81. else
  82. cat <<- _EOF_
  83. No option specified, Available options:
  84. --amber --blue --blue-gray --brown
  85. --cyan --deep-orange --deep-purple --green
  86. --gray --indigo --light-blue --light-green
  87. --lime --orange --pink --purple
  88. --red --teal --yellow
  89. _EOF_
  90. fi