Scripts to setup shell and install base packages
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.

69 lines
1.6 KiB

  1. #! /bin/sh
  2. if [ "$(whoami)" != "root" ]; then
  3. SUDO=sudo
  4. fi
  5. ${SUDO} apt update
  6. ${SUDO} apt install -y vim net-tools zsh fzf curl wget git net-tools curl dnsutils telnet htop mc screen iotop iperf3 glances
  7. # Install and configure Zimfw
  8. curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
  9. echo '
  10. zmodule environment
  11. zmodule git
  12. zmodule input
  13. zmodule termtitle
  14. zmodule utility
  15. zmodule duration-info
  16. zmodule git-info
  17. zmodule prompt-pwd
  18. zmodule eriner
  19. zmodule zsh-users/zsh-completions --fpath src
  20. zmodule completion
  21. zmodule zsh-users/zsh-syntax-highlighting
  22. zmodule zsh-users/zsh-history-substring-search
  23. zmodule zsh-users/zsh-autosuggestions' > ~/.zimrc
  24. # Configure FZF
  25. ${SUDO} echo " source /usr/share/doc/fzf/examples/completion.zsh" >> ~/.zshrc
  26. ${SUDO} echo "source /usr/share/doc/fzf/examples/key-bindings.zsh" >> ~/.zshrc
  27. ${SUDO} echo 'alias vi="vim"' >> ~/.zshrc
  28. # Configure screen
  29. echo "defshell -zsh" > ~/.screenrc
  30. # Configure VIM
  31. curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  32. echo "
  33. call plug#begin()
  34. Plug 'preservim/nerdtree'
  35. call plug#end()
  36. autocmd StdinReadPre * let s:std_in=1
  37. autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
  38. map <C-n> :NERDTreeToggle<CR>
  39. map <C-l> <C-w>l
  40. map <C-h> <C-w>h
  41. map <C-j> <C-w>j
  42. map <C-k> <C-w>k
  43. set ts=2
  44. set syntax=
  45. set sw=2
  46. set mouse=
  47. set undodir=~/.vim/undo/
  48. set undofile" > ~/.vimrc
  49. vim +PlugInstall +qall
  50. # Set Timezone
  51. timedatectl set-timezone Asia/Kolkata
  52. # Change shell to zsh
  53. chsh -s /bin/zsh
  54. zsh
  55. # Install Zimfw modules
  56. zimfw install