#! /bin/sh if [ "$(whoami)" != "root" ]; then SUDO=sudo fi ${SUDO} apt update ${SUDO} apt install -y vim net-tools zsh fzf curl wget git net-tools curl dnsutils telnet htop mc screen iotop iperf3 glances # Install and configure Zimfw curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh echo ' zmodule environment zmodule git zmodule input zmodule termtitle zmodule utility zmodule duration-info zmodule git-info zmodule prompt-pwd zmodule eriner zmodule zsh-users/zsh-completions --fpath src zmodule completion zmodule zsh-users/zsh-syntax-highlighting zmodule zsh-users/zsh-history-substring-search zmodule zsh-users/zsh-autosuggestions' > ~/.zimrc # Configure FZF ${SUDO} echo " source /usr/share/doc/fzf/examples/completion.zsh" >> ~/.zshrc ${SUDO} echo "source /usr/share/doc/fzf/examples/key-bindings.zsh" >> ~/.zshrc ${SUDO} echo 'alias vi="vim"' >> ~/.zshrc # Configure screen echo '# Allow bold colors - necessary for some reason attrcolor b ".I" # Tell screen how to set colors. AB = background, AF=foreground termcapinfo xterm "Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm" # Enables use of shift-PgUp and shift-PgDn #termcapinfo xterm|xterms|xs|rxvt ti@:te@ # Erase background with current bg color #defbce "on" # Enable 256 color term #term xterm-256color # Cache 30000 lines for scroll back defscrollback 300000 # New mail notification #backtick 101 30 15 $HOME/bin/mailstatus.sh hardstatus alwayslastline # Very nice tabbed colored hardstatus line hardstatus string "%{= Kd} %{= Kd}%-w%{= Kr}[%{= KW}%n: %H%{= Kr} %{= Kr}]%{= Kd}%+w %-= %{KG} %H %{KW}|%{KY}%110`%{KW}|%D %M %d %Y%{= Kc} %C%A%{-}" #hardstatus string "%{= KW} %H [%` %h] %{= Kw}|%{-} %-Lw%{= bW}%n%f %t%{-}%+Lw %=%C%a %Y-%M-%d" #hardstatus string "%?%F%{;4}%?%3n %t%? [%h]%?" #hardstatus alwayslastline "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?" # change command character from ctrl-a to ctrl-b (emacs users may want this) #escape ^Bb # Hide hardstatus: ctrl-a f bind f eval "hardstatus ignore" # Show hardstatus: ctrl-a F bind F eval "hardstatus alwayslastline" defshell -zsh' > ~/.screenrc # Configure VIM curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim echo " call plug#begin() Plug 'preservim/nerdtree' call plug#end() autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif map :NERDTreeToggle map l map h map j map k set ts=2 set syntax= set sw=2 set mouse= set undodir=~/.vim/undo/ set undofile" > ~/.vimrc vim +PlugInstall +qall # Set Timezone timedatectl set-timezone Asia/Kolkata # Change shell to zsh chsh -s /bin/zsh zsh # Install Zimfw modules zimfw install