Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

176 lines
5.2 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. #!/bin/bash
  2. username=$(whoami)
  3. mvie(){
  4. if [ -e "$1" ];then
  5. rm -rf "$2"
  6. mv "$1" "$2"
  7. fi
  8. }
  9. # Configuring for your username
  10. if [ ! "$username" = "yigit" ]; then
  11. grep -rl "yigit" | xargs sed -i "s/yigit/$username/g"
  12. fi
  13. # Don't prompt for a password for the rest of the script
  14. sudo echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopwd
  15. # Install packages
  16. echo "Running update"
  17. sudo rm -rf /etc/urlview/system.urlview
  18. yay -S --noconfirm $(cat ~/.dotfiles/arch-setup/packages.minimal)
  19. # Initial cleanup
  20. echo "Backing up your previous dotfiles to ~/.dotfiles_backup"
  21. mkdir -p ~/.dotfiles_backup
  22. mvie ~/.profile ~/.dotfiles_backup/profile
  23. ln -s ~/.dotfiles/profile ~/.profile
  24. # Config
  25. mkdir -p ~/.config
  26. mkdir -p ~/.dotfiles_backup/config
  27. for d in ~/.dotfiles/config/* ; do
  28. filename=$(echo "$d" | rev | cut -d"/" -f 1 | rev)
  29. mvie ~/.config/$filename ~/.dotfiles_backup/config
  30. ln -s $d ~/.config/
  31. done
  32. # Config
  33. mkdir -p ~/.local/share
  34. mkdir -p ~/.dotfiles_backup/local/share
  35. mvie ~/.themes ~/.dotfiles_backup/themes
  36. ln -s ~/.dotfiles/local/share/themes ~/.themes
  37. mvie ~/.icons ~/.dotfiles_backup/icons
  38. ln -s ~/.dotfiles/local/share/icons ~/.icons
  39. ~/.dotfiles/local/share/icons/Tela-Icons/install.sh
  40. for d in ~/.dotfiles/local/share/* ; do
  41. filename=$(echo "$d" | rev | cut -d"/" -f 1 | rev)
  42. echo $filename
  43. mvie ~/.local/share/$filename ~/.dotfiles_backup/local/share
  44. ln -s $d ~/.local/share
  45. done
  46. mvie ~/.local/share/bin ~/.dotfiles_backup/local/share/bin
  47. ln -s ~/.dotfiles/local/bin ~/.local/share/bin
  48. mvie ~/.local/backgrounds ~/.dotfiles_backup/local/backgrounds
  49. ln -s ~/.dotfiles/local/backgrounds ~/.local/backgrounds
  50. prev=$(pwd)
  51. cd ~/.local/share/fonts
  52. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Regular%20Nerd%20Font%20Complete.otf > /dev/null 2> /dev/null
  53. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Regular%20Nerd%20Font%20Complete%20Mono.otf > /dev/null 2> /dev/null
  54. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Bold%20Nerd%20Font%20Complete.otf > /dev/null 2> /dev/null
  55. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Bold%20Nerd%20Font%20Complete%20Mono.otf > /dev/null 2> /dev/null
  56. cd ~/.local/backgrounds
  57. wget https://minio.yigitcolakoglu.com/dotfiles/lock.jpg > /dev/null 2> /dev/null
  58. wget https://minio.yigitcolakoglu.com/dotfiles/wallpaper-mountain.jpg > /dev/null 2> /dev/null
  59. wget https://minio.yigitcolakoglu.com/dotfiles/wallpaper-sea.jpg > /dev/null 2> /dev/null
  60. wget https://minio.yigitcolakoglu.com/dotfiles/wallpaper-shack.jpg > /dev/null 2> /dev/null
  61. cd $prev
  62. fc-cache
  63. # Applications
  64. mkdir -p ~/.local/share/applications
  65. mkdir -p ~/.dotfiles_backup/local/share/applications
  66. for d in ~/.dotfiles/local/applications/* ; do
  67. filename=$(echo "$d" | rev | cut -d"/" -f 1 | rev)
  68. mvie ~/.local/share/applications/$filename ~/.dotfiles_backup/local/share/applications
  69. ln -s $d ~/.local/share/applications/
  70. done
  71. # Suckless
  72. yay --noconfirm -S xsel clipnotify
  73. yay --noconfirm -S ttf-symbola
  74. yay --noconfirm -S yajl
  75. (cd ~/.dotfiles/suckless; ~/.dotfiles/suckless/build.sh)
  76. if [ ! -f "/var/spool/cron/$username" ]; then
  77. sudo touch "/var/spool/cron/$username"
  78. sudo chown $username:$username "/var/spool/cron/$username"
  79. sudo chmod 755 "/var/spool/cron/$username"
  80. fi
  81. # Create necessary folders
  82. source ~/.profile
  83. mkdir -p "$HOME/.local/share/ncmpcpp/lyrics"
  84. mkdir -p "$HOME/.local/share/calcurse"
  85. mkdir -p "$CARGO_HOME"
  86. mkdir -p "$GOPATH"
  87. mkdir -p "$ANDROID_HOME"
  88. mkdir -p "$FLUTTER_HOME"
  89. mkdir -p "$LEIN_HOME"
  90. mkdir -p "$NPM_CONFIG_USERCONFIG"
  91. mkdir -p "$NVM_DIR"
  92. mkdir -p "$GNUPGHOME"
  93. mkdir -p "$WEECHAT_HOME"
  94. mkdir -p "$JUPYTER_CONFIG_DIR"
  95. mkdir -p "$PYLINTHOME"
  96. touch "$_Z_DATA"
  97. echo "*/8 * * * * /home/$username/.local/bin/mailsync" >> /var/spool/cron/$username
  98. echo "*/15 * * * * /home/$username/.local/bin/scripts/nextcloud-sync" >> /var/spool/cron/$username
  99. echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/$username
  100. echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/$username
  101. # Root
  102. sudo cp ~/.dotfiles/root/dwm.desktop /usr/share/xsessions
  103. sudo cp ~/.dotfiles/root/nancyj.flf /usr/share/figlet/fonts
  104. sudo cp ~/.dotfiles/root/quark.service /usr/lib/systemd/system
  105. sudo cp ~/.dotfiles/root/kdialog /usr/local/bin/kdialog
  106. sudo cp ~/.dotfiles/root/udevil.conf /etc/udevil/udevil.conf
  107. sudo chmod +x /usr/local/bin/kdialog
  108. sudo systemctl daemon-reload
  109. sudo systemctl enable quark
  110. # Config
  111. cp ~/.dotfiles/config.env.def ~/.config.env
  112. # Start page
  113. prev=$(pwd)
  114. cd ~/.dotfiles/browser/startpage
  115. npm install
  116. npm run build
  117. cd $prev
  118. if [ "$username" = "yigit" ]; then
  119. ~/.dotfiles/arch-setup/fetch_keys.sh # Fetch keys (For personal use, this is not for you)
  120. fi
  121. # Install vim and tmux plugins
  122. mkdir -p ~/.tmux/plugins
  123. vim +PlugInstall +qall
  124. # Install mconnect
  125. git clone https://github.com/theFr1nge/mconnect.git /tmp/mconnect
  126. prev=$(pwd)
  127. cd /tmp/mconnect
  128. mkdir -p build
  129. cd build
  130. meson ..
  131. ninja
  132. sudo ninja install
  133. cd $prev
  134. mkdir -p ~/Downloads/mconnect
  135. sudo git clone https://github.com/theFr1nge/bitwarden-dmenu.git /usr/share/bwdmenu
  136. cd /usr/share/bwdmenu
  137. sudo npm install
  138. sudo npm i -g
  139. cd $prev
  140. # Install simcrop
  141. sudo pacman --needed --noconfirm -S opencv
  142. git clone https://github.com/theFr1nge/simcrop.git /tmp/simcrop
  143. cd /tmp/simcrop
  144. sudo make install
  145. cd $prev
  146. sudo rm -rf /etc/sudoers.d/nopwd