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.

102 lines
2.1 KiB

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