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.

81 lines
1.6 KiB

  1. #!/usr/bin/env bash
  2. dir="$HOME/.config/polybar"
  3. themes=(`ls --hide="launch.sh" $dir`)
  4. launch_bar() {
  5. # Terminate already running bar instances
  6. killall -q polybar
  7. # Wait until the processes have been shut down
  8. while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
  9. # Launch the bar
  10. if [[ "$style" == "hack" || "$style" == "cuts" ]]; then
  11. polybar -q top -c "$dir/$style/config.ini" &
  12. polybar -q bottom -c "$dir/$style/config.ini" &
  13. elif [[ "$style" == "pwidgets" ]]; then
  14. bash "$dir"/pwidgets/launch.sh --main
  15. else
  16. polybar -q main -c "$dir/$style/config.ini" &
  17. fi
  18. }
  19. if [[ "$1" == "--material" ]]; then
  20. style="material"
  21. launch_bar
  22. elif [[ "$1" == "--shades" ]]; then
  23. style="shades"
  24. launch_bar
  25. elif [[ "$1" == "--hack" ]]; then
  26. style="hack"
  27. launch_bar
  28. elif [[ "$1" == "--docky" ]]; then
  29. style="docky"
  30. launch_bar
  31. elif [[ "$1" == "--cuts" ]]; then
  32. style="cuts"
  33. launch_bar
  34. elif [[ "$1" == "--shapes" ]]; then
  35. style="shapes"
  36. launch_bar
  37. elif [[ "$1" == "--grayblocks" ]]; then
  38. style="grayblocks"
  39. launch_bar
  40. elif [[ "$1" == "--blocks" ]]; then
  41. style="blocks"
  42. launch_bar
  43. elif [[ "$1" == "--colorblocks" ]]; then
  44. style="colorblocks"
  45. launch_bar
  46. elif [[ "$1" == "--forest" ]]; then
  47. style="forest"
  48. launch_bar
  49. elif [[ "$1" == "--pwidgets" ]]; then
  50. style="pwidgets"
  51. launch_bar
  52. elif [[ "$1" == "--panels" ]]; then
  53. style="panels"
  54. launch_bar
  55. else
  56. cat <<- EOF
  57. Usage : launch.sh --theme
  58. Available Themes :
  59. --blocks --colorblocks --cuts --docky
  60. --forest --grayblocks --hack --material
  61. --panels --pwidgets --shades --shapes
  62. EOF
  63. fi