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.

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