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.

173 lines
5.1 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
  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. find /home/$username/.dotfiles -type f | xargs sed -i "s/\/home\/yigit/\/home\/$username/g"
  12. fi
  13. # Install packages
  14. echo "Running update"
  15. sudo pacman --noconfirm -Syu
  16. sudo pacman --noconfirm --needed -S $(cat ~/.dotfiles/arch-setup/nonAUR.txt)
  17. yay -S --noconfirm --needed $(cat ~/.dotfiles/arch-setup/AUR.txt)
  18. # Initial cleanup
  19. echo "Backing up your previous dotfiles to ~/.dotfiles_backup"
  20. mkdir -p ~/.dotfiles_backup
  21. mvie ~/.profile ~/.dotfiles_backup/profile
  22. ln -s ~/.dotfiles/profile ~/.profile
  23. # Config
  24. mkdir -p ~/.config
  25. mkdir -p ~/.dotfiles_backup/config
  26. for d in ~/.dotfiles/config/* ; do
  27. filename=$(echo "$d" | rev | cut -d"/" -f 1 | rev)
  28. echo $filename
  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/backgrounds ~/.dotfiles_backup/local/backgrounds
  47. ln -s ~/.dotfiles/local/backgrounds ~/.local/backgrounds
  48. prev=$(pwd)
  49. cd ~/.local/share/fonts
  50. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Regular%20Nerd%20Font%20Complete.otf > /dev/null 2> /dev/null
  51. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Regular%20Nerd%20Font%20Complete%20Mono.otf > /dev/null 2> /dev/null
  52. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Bold%20Nerd%20Font%20Complete.otf > /dev/null 2> /dev/null
  53. wget https://minio.yigitcolakoglu.com/dotfiles/Caskaydia%20Cove%20Bold%20Nerd%20Font%20Complete%20Mono.otf > /dev/null 2> /dev/null
  54. cd ~/.local/backgrounds
  55. wget https://minio.yigitcolakoglu.com/dotfiles/lock.jpg > /dev/null 2> /dev/null
  56. wget https://minio.yigitcolakoglu.com/dotfiles/wallpaper-mountain.jpg > /dev/null 2> /dev/null
  57. wget https://minio.yigitcolakoglu.com/dotfiles/wallpaper-sea.jpg > /dev/null 2> /dev/null
  58. wget https://minio.yigitcolakoglu.com/dotfiles/wallpaper-shack.jpg > /dev/null 2> /dev/null
  59. cd $prev
  60. fc-cache
  61. # Applications
  62. mkdir -p ~/.local/share/applications
  63. mkdir -p ~/.dotfiles_backup/local/share/applications
  64. for d in ~/.dotfiles/local/applications/* ; do
  65. filename=$(echo "$d" | rev | cut -d"/" -f 1 | rev)
  66. mvie ~/.local/share/applications/$filename ~/.dotfiles_backup/local/share/applications
  67. ln -s $d ~/.local/share/applications/
  68. done
  69. # Suckless
  70. yay --noconfirm -S xsel clipnotify
  71. yay --noconfirm -S ttf-symbola
  72. (cd ~/.dotfiles/suckless; ~/.dotfiles/suckless/build.sh)
  73. if [ ! -f "/var/spool/cron$username" ]; then
  74. sudo touch "/var/spool/cron/$username"
  75. sudo chown yigit:yigit "/var/spool/cron/$username"
  76. sudo chmod 755 "/var/spool/cron/$username"
  77. fi
  78. # Create necessary folders
  79. source ~/.profile
  80. mkdir -p "$CARGO_HOME"
  81. mkdir -p "$GOPATH"
  82. mkdir -p "$ANDROID_HOME"
  83. mkdir -p "$FLUTTER_HOME"
  84. mkdir -p "$LEIN_HOME"
  85. mkdir -p "$NPM_CONFIG_USERCONFIG"
  86. mkdir -p "$NVM_DIR"
  87. mkdir -p "$GNUPGHOME"
  88. mkdir -p "$MBSYNCRC"
  89. mkdir -p "$VIMINIT"
  90. mkdir -p "$MYSQL_HISTFILE"
  91. mkdir -p "$TASKDATA"
  92. mkdir -p "$TASKRC"
  93. mkdir -p "$WEECHAT_HOME"
  94. mkdir -p "$LESSKEY"
  95. mkdir -p "$LESSHISTFILE"
  96. mkdir -p "$NOTMUCH_CONFIG"
  97. mkdir -p "$NMBGIT"
  98. mkdir -p "$JUPYTER_CONFIG_DIR"
  99. mkdir -p "$PYLINTHOME"
  100. touch "$_Z_DATA"
  101. echo "*/8 * * * * /home/$username/.local/share/scripts/mailsync" >> /var/spool/cron/yigit
  102. echo "*/15 * * * * /home/$username/.local/share/scripts/scripts/nextcloud-sync" >> /var/spool/cron/yigit
  103. echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/yigit
  104. echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/yigit
  105. # Root
  106. sudo cp ~/.dotfiles/root/dwm.desktop /usr/share/xsessions
  107. sudo cp ~/.dotfiles/root/nancyj.flf /usr/share/figlet/fonts
  108. sudo cp ~/.dotfiles/root/quark.service /usr/lib/systemd/system
  109. sudo cp ~/.dotfiles/root/kdialog /usr/local/bin/kdialog
  110. sudo cp ~/.dotfiles/root/udevil.conf /etc/udevil/udevil.conf
  111. sudo chmod +x /usr/local/bin/kdialog
  112. sudo systemctl daemon-reload
  113. sudo systemctl enable quark
  114. # Config
  115. cp ~/.dotfiles/config.env.def ~/.config.env
  116. # Start page
  117. prev=$(pwd)
  118. cd ~/.dotfiles/browser/startpage
  119. npm install
  120. npm run build
  121. cd $prev
  122. ~/.dotfiles/arch-setup/fetch_keys.sh # Fetch keys (For personal use, this is not for you)
  123. # Install vim and tmux plugins
  124. mkdir -p ~/.tmux/plugins
  125. vim -c ':PlugInstall'
  126. # Install mconnect
  127. git clone https://github.com/theFr1nge/mconnect.git /tmp/mconnect
  128. prev=$(pwd)
  129. cd /tmp/mconnect
  130. mkdir -p build
  131. cd build
  132. meson ..
  133. ninja
  134. sudo ninja install
  135. cd $prev
  136. mkdir -p ~/Downloads/mconnect
  137. sudo git clone https://github.com/theFr1nge/bitwarden-dmenu.git /usr/share/bwdmenu
  138. cd /usr/share/bwdmenu
  139. sudo npm install
  140. sudo npm i -g
  141. cd $prev
  142. # Install simcrop
  143. sudo pacman --needed --noconfirm -S opencv
  144. git clone https://github.com/theFr1nge/simcrop.git /tmp/simcrop
  145. cd /tmp/simcrop
  146. sudo make install
  147. cd $prev