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.

167 lines
5.0 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
  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 rm -rf /etc/urlview/system.urlview
  16. yay -S --noconfirm --needed $(cat ~/.dotfiles/arch-setup/packages.minimal)
  17. # Initial cleanup
  18. echo "Backing up your previous dotfiles to ~/.dotfiles_backup"
  19. mkdir -p ~/.dotfiles_backup
  20. mvie ~/.profile ~/.dotfiles_backup/profile
  21. ln -s ~/.dotfiles/profile ~/.profile
  22. # Config
  23. mkdir -p ~/.config
  24. mkdir -p ~/.dotfiles_backup/config
  25. for d in ~/.dotfiles/config/* ; do
  26. filename=$(echo "$d" | rev | cut -d"/" -f 1 | rev)
  27. mvie ~/.config/$filename ~/.dotfiles_backup/config
  28. ln -s $d ~/.config/
  29. done
  30. # Config
  31. mkdir -p ~/.local/share
  32. mkdir -p ~/.dotfiles_backup/local/share
  33. mvie ~/.themes ~/.dotfiles_backup/themes
  34. ln -s ~/.dotfiles/local/share/themes ~/.themes
  35. mvie ~/.icons ~/.dotfiles_backup/icons
  36. ln -s ~/.dotfiles/local/share/icons ~/.icons
  37. ~/.dotfiles/local/share/icons/Tela-Icons/install.sh
  38. for d in ~/.dotfiles/local/share/* ; do
  39. filename=$(echo "$d" | rev | cut -d"/" -f 1 | rev)
  40. echo $filename
  41. mvie ~/.local/share/$filename ~/.dotfiles_backup/local/share
  42. ln -s $d ~/.local/share
  43. done
  44. mvie ~/.local/share/bin ~/.dotfiles_backup/local/share/bin
  45. ln -s ~/.dotfiles/local/bin ~/.local/share/bin
  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 "$HOME/.local/share/ncmpcpp/lyrics"
  81. mkdir -p "$HOME/.local/share/calcurse"
  82. mkdir -p "$CARGO_HOME"
  83. mkdir -p "$GOPATH"
  84. mkdir -p "$ANDROID_HOME"
  85. mkdir -p "$FLUTTER_HOME"
  86. mkdir -p "$LEIN_HOME"
  87. mkdir -p "$NPM_CONFIG_USERCONFIG"
  88. mkdir -p "$NVM_DIR"
  89. mkdir -p "$GNUPGHOME"
  90. mkdir -p "$WEECHAT_HOME"
  91. mkdir -p "$JUPYTER_CONFIG_DIR"
  92. mkdir -p "$PYLINTHOME"
  93. touch "$_Z_DATA"
  94. echo "*/8 * * * * /home/$username/.local/bin/mailsync" >> /var/spool/cron/yigit
  95. echo "*/15 * * * * /home/$username/.local/bin/scripts/nextcloud-sync" >> /var/spool/cron/yigit
  96. echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/yigit
  97. echo "*/30 * * * * vdirsyncer sync" >> /var/spool/cron/yigit
  98. # Root
  99. sudo cp ~/.dotfiles/root/dwm.desktop /usr/share/xsessions
  100. sudo cp ~/.dotfiles/root/nancyj.flf /usr/share/figlet/fonts
  101. sudo cp ~/.dotfiles/root/quark.service /usr/lib/systemd/system
  102. sudo cp ~/.dotfiles/root/kdialog /usr/local/bin/kdialog
  103. sudo cp ~/.dotfiles/root/udevil.conf /etc/udevil/udevil.conf
  104. sudo chmod +x /usr/local/bin/kdialog
  105. sudo systemctl daemon-reload
  106. sudo systemctl enable quark
  107. # Config
  108. cp ~/.dotfiles/config.env.def ~/.config.env
  109. # Start page
  110. prev=$(pwd)
  111. cd ~/.dotfiles/browser/startpage
  112. npm install
  113. npm run build
  114. cd $prev
  115. ~/.dotfiles/arch-setup/fetch_keys.sh # Fetch keys (For personal use, this is not for you)
  116. # Install vim and tmux plugins
  117. mkdir -p ~/.tmux/plugins
  118. vim +PlugInstall +qall
  119. # Install mconnect
  120. git clone https://github.com/theFr1nge/mconnect.git /tmp/mconnect
  121. prev=$(pwd)
  122. cd /tmp/mconnect
  123. mkdir -p build
  124. cd build
  125. meson ..
  126. ninja
  127. sudo ninja install
  128. cd $prev
  129. mkdir -p ~/Downloads/mconnect
  130. sudo git clone https://github.com/theFr1nge/bitwarden-dmenu.git /usr/share/bwdmenu
  131. cd /usr/share/bwdmenu
  132. sudo npm install
  133. sudo npm i -g
  134. cd $prev
  135. # Install simcrop
  136. sudo pacman --needed --noconfirm -S opencv
  137. git clone https://github.com/theFr1nge/simcrop.git /tmp/simcrop
  138. cd /tmp/simcrop
  139. sudo make install
  140. cd $prev