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.

74 lines
1.4 KiB

  1. #!/usr/bin/env bash
  2. # Color files
  3. PFILE="$HOME/.config/polybar/blocks/colors.ini"
  4. RFILE="$HOME/.config/polybar/blocks/scripts/rofi/colors.rasi"
  5. # Change colors
  6. change_color() {
  7. # polybar
  8. sed -i -e "s/background = #.*/background = $BG/g" $PFILE
  9. sed -i -e "s/background-alt = #.*/background-alt = $BGA/g" $PFILE
  10. sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE
  11. sed -i -e "s/foreground-alt = #.*/foreground-alt = $FGA/g" $PFILE
  12. sed -i -e "s/primary = #.*/primary = $AC/g" $PFILE
  13. # rofi
  14. cat > $RFILE <<- EOF
  15. /* colors */
  16. * {
  17. al: #00000000;
  18. bg: ${BG}FF;
  19. bga: ${BGA}FF;
  20. fga: ${FGA}FF;
  21. fg: ${FG}FF;
  22. ac: ${AC}FF;
  23. se: ${AC}40;
  24. }
  25. EOF
  26. polybar-msg cmd restart
  27. }
  28. if [[ $1 = "--default" ]]; then
  29. BG="#2f343f"
  30. BGA="#C4C7C5"
  31. FGA="#C4C7C5"
  32. FG="#1C1E20"
  33. AC="#B4BC67"
  34. change_color
  35. elif [[ $1 = "--nord" ]]; then
  36. BG="#3B4252"
  37. BGA="#4C566A"
  38. FGA="#E5E9F0"
  39. FG="#ECEFF4"
  40. AC="#A3BE8C"
  41. change_color
  42. elif [[ $1 = "--gruvbox" ]]; then
  43. BG="#282828"
  44. BGA="#EBDBB2"
  45. FGA="#EBDBB2"
  46. FG="#282828"
  47. AC="#CC241D"
  48. change_color
  49. elif [[ $1 = "--adapta" ]]; then
  50. BG="#243035"
  51. BGA="#38444A"
  52. FGA="#FDF6E3"
  53. FG="#FFFFFF"
  54. AC="#4DD0E1"
  55. change_color
  56. elif [[ $1 = "--cherry" ]]; then
  57. BG="#1F1626"
  58. BGA="#423949"
  59. FGA="#FFFFFF"
  60. FG="#FFFFFF"
  61. AC="#D94085"
  62. change_color
  63. else
  64. cat <<- _EOF_
  65. No option specified, Available options:
  66. --default --nord --gruvbox --adapta --cherry
  67. _EOF_
  68. fi