leviyanx / config

My dotfiles in Linux/MacOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My dotfiles in Linux/MacOS.

How to use?

Pull Config

  1. Execute git init in $HOME.
  2. Connect this repo:git remote add origin git@github.com:leviyanx/config.git.
  3. Make sure that SSH can connect Github.
  4. Pull repo:git pull origin main.
  5. Pull submodule:git submodule update --init --recursive.

Install Programs

This repo contains a script that will try to install most of these programs automatically. However, some programs may require manual installation. You will see their messages on the prompt. You need to follow these messages to install them manually.

Install ZSH, run zsh (its config file is .zshrc), and then wait some programs to be installed, including:

  1. Powerlevel10k: .zshrc and .p10k.zsh
  2. Vim: .vimrc and .vim
  3. Settings for IdeaVim: .ideavimrc
  4. fzf

After installation of programs mentioned above, there are some important programs to be installed manually:

  1. Neovim
  2. Nodejs
    • General: v14.14.0 / Arm MacOS: v16.x (fit the requirement of coc)
      1. Find and then download the corrosponding compressed package from this URL https://nodejs.org/dist/ .
      2. Extract files from it and rename the folder to nodejs (e.g. node-v14.14.0-linux-x64 -> nodejs).
      3. Move this dir into /usr/local/src.
    • DO NOT USE NVM that slows down zsh.
  3. Ranger
    • ~/.config/ranger
  4. Autojump
    • After installation, run
source /usr/share/autojump/autojump.zsh
  1. Lazygit
    • macOS: ~/Library/Application support/lazygit

Setup Environment

TL;DR: Put or link your executable files into /usr/local/bin instead of usr/bin

Executable files in /usr/bin cannot be changed on MacOS, so I set zsh/bash source /usr/local/bin before /usr/bin, and then executable files in /usr/local/bin will cover those in /usr/bin.

So, after steps above, you can put or link your executable files into /usr/local/bin instead of /usr/bin. And you'll be able to enjoy the freedom of changing the environment variables that your work depends on (e.g. python3, nodejs).


Environment location

  • go: /usr/local/src
  • nodejs: /usr/local/src

Extra

  1. Alacritty
    • ~/.config/alacritty
  2. alacritty-theme-switch: conveniently switch alacritty themes
    1. install: npm install -g alacritty-theme-switch
    2. usage: run alacritty-theme-switch or ats
  3. font: sauce-code-pro-nerd-font
    1. install
      1. macOS: brew tap homebrew/cask-fonts, brew install --cask font-sauce-code-pro-nerd-font

About

My dotfiles in Linux/MacOS.


Languages

Language:Shell 55.2%Language:Vim Script 42.2%Language:Python 2.7%