My dotfiles in Linux/MacOS.
How to use?
Pull Config
- Execute
git init
in$HOME
. - Connect this repo:
git remote add origin git@github.com:leviyanx/config.git
. - Make sure that SSH can connect Github.
- If this is a new system, set SSH to connect with github.
- Pull repo:
git pull origin main
. - 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:
- Powerlevel10k:
.zshrc
and.p10k.zsh
- Vim:
.vimrc
and.vim
- Settings for IdeaVim:
.ideavimrc
- fzf
After installation of programs mentioned above, there are some important programs to be installed manually:
- Neovim
- Nodejs
- General: v14.14.0 / Arm MacOS: v16.x (fit the requirement of coc)
- Find and then download the corrosponding compressed package from this URL https://nodejs.org/dist/ .
- Extract files from it and rename the folder to
nodejs
(e.g.node-v14.14.0-linux-x64
->nodejs
). - Move this dir into
/usr/local/src
.
- DO NOT USE NVM that slows down zsh.
- General: v14.14.0 / Arm MacOS: v16.x (fit the requirement of coc)
- Ranger
~/.config/ranger
- Autojump
- After installation, run
source /usr/share/autojump/autojump.zsh
- Lazygit
- macOS:
~/Library/Application support/lazygit
- macOS:
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
- Alacritty
~/.config/alacritty
- alacritty-theme-switch: conveniently switch alacritty themes
- install:
npm install -g alacritty-theme-switch
- usage: run
alacritty-theme-switch
orats
- install:
- font: sauce-code-pro-nerd-font
- install
- macOS:
brew tap homebrew/cask-fonts
,brew install --cask font-sauce-code-pro-nerd-font
- macOS:
- install