Simple image host.
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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #!/bin/bash
  2. issues=0
  3. check_command()
  4. {
  5. which "$1" &> /dev/null
  6. if [ "$?" -ne 0 ]; then
  7. issues=1
  8. echo "Missing command: $1"
  9. fi
  10. }
  11. issues=0
  12. check_file()
  13. {
  14. if [ ! -f "$1" ]; then
  15. issues=1
  16. echo "Missing file: $1"
  17. fi
  18. }
  19. check_command "zsh"
  20. check_command "tmux"
  21. check_command "vim"
  22. check_command "python"
  23. check_command "xdotool"
  24. check_command "i3"
  25. check_command "compton"
  26. check_command "amixer"
  27. check_command "xbacklight"
  28. check_command "feh"
  29. check_command "xsel"
  30. check_command "sxhkd"
  31. check_command "recordmydesktop"
  32. check_file ~/.mrecrc
  33. if [ $issues -ne 0 ]; then
  34. echo "Some commands or files are missing. Continue? (y/n)"
  35. read response
  36. if [ "$response" != "y" ]; then
  37. echo "Aborting."
  38. exit 1
  39. fi
  40. fi
  41. echo "Copying dotfiles..."
  42. cd dotfiles
  43. for f in *; do
  44. rm -rf "$HOME/.$f"
  45. cp -r "$f" "$HOME/.$f"
  46. done
  47. cd ..
  48. echo "Done."
  49. echo "Copying config files..."
  50. cd config
  51. for f in *; do
  52. rm -rf "$HOME/.config/$f"
  53. cp -r "$f" "$HOME/.config/$f"
  54. done
  55. cd ..
  56. echo "Done."
  57. echo "Copying executables..."
  58. mkdir -p "$HOME/bin"
  59. cd bin
  60. for f in *; do
  61. rm -rf "$HOME/bin/$f"
  62. cp -r "$f" "$HOME/bin/$f"
  63. done
  64. cd ..
  65. echo "Done."
  66. echo "Copying assets..."
  67. rm -fr "$HOME/assets"
  68. cp -r assets "$HOME/assets"
  69. echo "Done."
  70. while getopts :m option; do
  71. case "$option" in
  72. m)
  73. echo "Not switching mod and alt keys."
  74. echo "" > ~/.Xmodmaprc
  75. ;;
  76. *)
  77. echo "Unknown option: $option"
  78. ;;
  79. esac
  80. done
  81. echo "Everything set up!"