/dotfiles-linux

The configuration for my linux

Primary LanguageShell

The configuration for my linux

Install zsh and change to default

sudo apt install zsh xsel xclip tmux
chsh -s $(which zsh)

Generate ssh key and link to github

ssh-keygen -t rsa -b 4096 -C "ayusk.kumar.shah@gmail.com"
eval "$(ssh-agent -s)"
vim ~/.ssh/config

Add these lines:

Host *
  AddKeysToAgent yes
  IgnoreUnknown UseKeychain
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa
ssh-add ~/.ssh/id_rsa

Add the key to github

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

cat ~/.ssh/id_rsa.pub | pbcopy
pbpaste
# Then paste to github

Install ohmyzsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh

Install powerline fonts for agnoster theme

git clone https://github.com/powerline/fonts.git ~/fonts
. ~/fonts/install.sh

Ohmyzsh plugins

sudo apt install -y autojump
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

Set up dotfiles

git clone git@github.com:ayushkumarshah/dotfiles-linux.git

Make symlinks for dotfiles

  • Run the ln commands from setup.sh
 ln -svf ~/dotfiles-linux/.zshrc ~
 ln -svf ~/dotfiles-linux/.config/* ~/.config/
 ln -svf ~/dotfiles-linux/.tmux/ ~/.tmux
 ln -svf ~/dotfiles-linux/.tmux/tmux.conf ~/.tmux.conf
 cp ~/dotfiles-linux/.fonts/* ~/.fonts/

Install tmux plugins

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Press prefix + I (capital i, as in Install) to fetch the plugin.

Install miniconda

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh Miniconda3-latest-Linux-x86_64.sh

Neovim

Updated (latest version) - install from source

Check neovim

sudo apt-get install ninja-build gettext cmake unzip curl build-essential
git clone https://github.com/neovim/neovim.git
cd neovim
git checkout v0.10.0
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install

Update Node

sudo n 22.0.0

Add copilot

:Copolot setup

Old

  • Download stable nvim.appimage (0.6.1) from github releases:
mkdir ~/Downloads
wget https://github.com/neovim/neovim/releases/download/v0.6.1/nvim.appimage ~/Downloads/
chmod u+x nvim.appimage

# OR
cp nvim.appimage ~/Downloads/


  • Set alias of vim and nvim to nvim.appimage (Already done in dotfiles above)

Set up neovim dependencies

  • Run nvim-dependencies.sh

    • Installs fzf, ripgrep, ranger

    • For Mac:

      • brew install fzf ranger ripgrep
      • $(brew --prefix)/opt/fzf/inst
    • Install python packages

      conda activate base
      pip install pynvim==0.4.2 jedi==0.17.2
      
  • For luavim language server:

    • sudo npm i -g pyright bash-language-server
    • If doesn't work, comment all lua in init.vim, plugins nvim-lspconfig (already done)
  • Run :CocInstall coc-pyright

  • Run sh .config/nvim/scripts/install_coc_extensions.sh

Softwares

General

Work

Add this at end of /etc/fstab to mount windows automatically at startup */

/dev/disk/by-uuid/14821D20821D07BE /media/ayush/NewVolume auto nosuid,nodev,nofail,x-gvfs-show 

Configure keystore for chrome and nautilus: https://www.linuxquestions.org/questions/linux-desktop-74/openbox-autostart-gnome-keyring-daemon-message-4175547333/