oh my zsh & power lever 10k

  1. install deps

    sudo apt install git curl -y
    
  2. install zsh

    sudo apt install zsh -y
    
  3. check is installed

    cat /etc/shells | grep zsh
    
    # raiven@k3s:~$ cat /etc/shells | grep zsh
    # /bin/zsh
    # /usr/bin/zsh
    
  4. install oh-my-zsh

    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
    
  5. install powerlevel10k

    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
    
  6. install fonts:

    • wsl:
      bash -c "$(curl -fsSL https://raw.githubusercontent.com/omegaatt36/dotfiles/main/install_fonts.sh)" --windows
      
    • linux:
      bash -c "$(curl -fsSL https://raw.githubusercontent.com/omegaatt36/dotfiles/main/install_fonts.sh)"
      
  7. change login shell(must logout and login again)

    chsh -s $(which zsh)
    logout
    
    ...
    
    login
    
  8. install plugins(recommended)

    • zsh-autosuggestions
      git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
      
    • zsh-syntax-highlighting
      git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
      
    • wakatime-zsh-plugin
      git clone https://github.com/sobolevn/wakatime-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/wakatime
      
  9. configure zsh

    • [option 1] first use

      p10k configure
      
    • [option 2] have configured .zshrc my rc file

      curl https://raw.githubusercontent.com/omegaatt36/dotfiles/main/.zshrc -o $HOME/.zshrc
      curl https://raw.githubusercontent.com/omegaatt36/dotfiles/main/.p10k.zsh -o $HOME/.p10k.zsh
      

      must modify .zshrc export ZSH="/home/raiven/.oh-my-zsh" to your home path

      then source rc file

      source $HOME/.zshrc
      

tmux

  1. install tmux
    sudo apt install tmux -y
    
  2. install tpm (Tmux Plugin Manager)
    git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
    
  3. configure tmux
    curl https://raw.githubusercontent.com/omegaatt36/dotfiles/main/.tmux.conf -o $HOME/.tmux.conf
    
  4. enjoy tmux
    tmux
    
  5. Hit prefix + I to fetch the plugin and source it. You should now be able to use the plugin.

git lg

git config --global alias.lg "log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"

ref