Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pagliacii/dotfiles

Yep, my dotfiles.
https://github.com/pagliacii/dotfiles

Last synced: 12 days ago
JSON representation

Yep, my dotfiles.

Awesome Lists containing this project

README

        

#+TITLE: Pagliacii's dotfiles README
#+AUTHOR: Jason Huang (Pagliacii)
#+EMAIL: [email protected]
#+DATE: <2021-02-10 Wed>

#+DESCRIPTION: Recording some installation notes.
#+KEYWORDS: README, dotfiles
#+LANGUAGE: en
#+STARTUP: content

* Glance

#+CAPTION: This is the WezTerm screenshot.
[[./img/screenshot.png]]

LazyVim GIF: [[https://imgur.com/a/C5PaIhZ]]

* Table of Contents :TOC:
- [[#usage][Usage]]
- [[#install-oh-my-zsh][Install Oh My Zsh]]
- [[#prepare-python-development-environment][Prepare Python Development Environment]]
- [[#install-doom-emacs][Install Doom Emacs]]
- [[#install-useful-tools][Install useful tools]]

* Usage

#+BEGIN_SRC bash
$ git clone --recurse-submodules https://github.com/Pagliacii/dotfiles
$ cd dotfiles
# link all
$ stow
# or link some config, e.g. vim
$ stow vim
#+END_SRC

* Install Oh My Zsh

Make sure you have curl (or wget) and git installed.

1. Install [[https://brew.sh/][homebrew]] to help you install others quickly.

#+BEGIN_SRC bash
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#+END_SRC

2. Before installing *Oh My Zsh*, make sure you have *Zsh* installed.

3. Install [[https://github.com/ohmyzsh/ohmyzsh][Oh My Zsh]]

#+BEGIN_SRC bash
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#+END_SRC

4. Remove the default ~.zshrc~ file and use stow to link my ~.zshrc~ file.

#+BEGIN_SRC bash
$ rm ~/.zshrc
$ git clone --recurse-submodules https://github.com/Pagliacii/dotfiles
# or
$ git clone https://github.com/Pagliacii/dotfiles
$ cd dotfiles
$ git submodule update --init
# link zsh configs
$ cd dotfiles
$ stow zsh
$ source ~/.zshrc
#+END_SRC

If the shell yells some warning messages, you can try to install needed dependencies to silence those noises. Or just disabling corresponding plugins in ~~/.zshrc~ file.

5. (*Optional*) Install [[https://starship.rs/][starship]], [[https://github.com/nvbn/thefuck][thefuck]] and [[https://github.com/wting/autojump][autojump]]

#+BEGIN_SRC bash
$ brew install starship thefuck autojump
$ stow starship
$ source ~/.zshrc
#+END_SRC

* Prepare Python Development Environment

1. Use [[https://github.com/pyenv/pyenv][pyenv]] can save your time if you will deal with multiple versions of Python.

#+BEGIN_SRC bash
$ brew install pyenv pyenv-virtualenv
#+END_SRC

2. *Install Python build dependencies* before attempting to install a new Python version. See this [[https://github.com/pyenv/pyenv/wiki#suggested-build-environment][link]] to more details.

3. To install the specific version of Python, replace ~~ with the actual version.

#+BEGIN_SRC bash
$ pyenv install
# You can list all supported versions by `pyenv install --list`
# Install the Python dev package like: python3-dev
#+END_SRC

4. Link to my pip configuration file.

#+BEGIN_SRC bash
# link pip to replace the pypi source
$ cd dotfiles && stow pip
#+END_SRC

5. Use [[https://python-poetry.org][Poetry]] to manage Python dependencies.

#+BEGIN_SRC bash
# Install poetry
$ curl -fsSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
# Verify
$ poetry --version
# Enable tab completion for Oh My Zsh
$ md $ZSH_CUSTOM/plugins/poetry
$ poetry completions zsh > $ZSH_CUSTOM/plugins/poetry/_poetry
#+END_SRC

If the install step is stuck at the poetry package downloading, you can download the package file manually. See the [[https://github.com/python-poetry/poetry/releases][releases page]] for more details. \\
And run commands below to install it manually

#+BEGIN_SRC bash
# Download get-poetry.py
$ curl -fsSLO https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
# Download Poetry package file
$ wget https://github.com/python-poetry/poetry/releases/download//poetry--.tar.gz
# Install from the local package file
$ python get-poetry.py --file /path/to/poetry--.tar.gz
#+END_SRC

6. (*Optional*) Install useful tools

#+BEGIN_SRC bash
# Install IPython
$ pip install ipython
# Install pipx
$ brew install pipx
$ pipx ensurepath
$ pipx completions
#+END_SRC

* Install Doom Emacs

1. Make sure you have emacs installed. Otherwise, you can use ~brew~ to install it.

#+BEGIN_SRC bash
$ brew install emacs
# Install Doom Emacs required dependencies
$ brew install git ripgrep
# Install Doom Emacs optional dependencies
$ brew install fd
#+END_SRC

2. Link to my Doom Emacs configuration files.

#+BEGIN_SRC bash
$ git clone --recurse-submodules https://github.com/Pagliacii/dotfiles
$ cd dotfiles
# link
$ stow doom-emacs
#+END_SRC

3. Install Doom Emacs

#+BEGIN_SRC bash
$ ~/.emacs.d/bin/doom install
#+END_SRC

4. Detect your environment

#+BEGIN_SRC bash
# fix warnings showing up to improve your Doom Emacs running environment
$ ~/.emacs.d/bin/doom doctor
#+END_SRC

5. (*Optional*) Extra works

#+BEGIN_SRC bash
# add `~/.emacs.d/bin` to your PATH envvar
$ echo 'export PATH="$HOME/.emacs.d/bin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc
# download some fonts to ~/.local/share/fonts and run command below
$ fc-cache -vf ~/.local/share/fonts
#+END_SRC

* Install useful tools

#+BEGIN_SRC bash
# Install fzf
$ brew install fzf
# To install useful key bindings and fuzzy completion
$ $(brew --prefix)/opt/fzf/install
# Install bat and bat-extras
$ brew tap eth-p/software
$ brew install bat bat-extras
# Install ripgrep
$ brew install ripgrep
# Install fd
$ brew install fd
# Install hyperfine
$ brew install hyperfine
# Install hexyl
$ brew install hexyl
# Install lsd
$ brew install lsd
# Install pygments for colorize
$ brew install pygments
# Install tree
$ brew install tree
# Install wakatime-cli, then copy and paste your API key into `~/.wakatime.cfg` file
$ brew install wakatime-cli
# Install glow
$ brew install glow
# Install htop
$ brew install htop
# Install bpytop
$ pip install bpytop --upgrade
# Install licensor
$ brew install licensor
# Install httpie
$ brew install httpie
# Install neofetch
$ brew install neofetch
# Install navi
$ proxy brew install navi
#+END_SRC