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.

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