Zhniing / Dotfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instruction

Install dotfiles

1. Clone as a bare repository

git clone --bare git@github.com:Zhniing/Dotfiles.git $HOME/Projects/Dotfiles.git

2. Create an alias dit (dotfiles & git)

After the .zshrc being sourced, you can interact with this bare repository using git directly when your working directory is $HOME

alias dit="git --git-dir=$HOME/Projects/Dotfiles.git --work-tree=$HOME"

3. Ignore untracked files in git status

dit config --local status.showUntrackedFiles no

4. Restore files (will overwrite existing files):

dit checkout HEAD <FILE>  # Restore the specific file
dit reset --hard HEAD     # Restore all files

Resources:

Zsh

Choose a .zshrc

ln -s .omz.zshrc .zshrc  # Use Oh-My-Zsh
ln -s .grml.zshrc .zshrc  # Use grml-zsh-config

Install oh-my-zsh

git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh

Install third-party plugins

1. zsh-autosuggestions

zsh-users/zsh-autosuggestions: Fish-like autosuggestions for zsh

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

2. fast-syntax-highlighting

zdharma-continuum/fast-syntax-highlighting: Feature-rich syntax highlighting for ZSH

git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting

3. fzf-tab

Aloxaf/fzf-tab: Replace zsh's default completion selection menu with fzf!

git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab

4. fzf-git.sh

junegunn/fzf-git.sh: bash and zsh key bindings for Git objects, powered by fzf

wget https://raw.githubusercontent.com/junegunn/fzf-git.sh/main/fzf-git.sh -O ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/fzf-git.zsh

Alacritty

Install fonts

  1. Download Hack Nerd Font from the latest release

  2. Unzip and move the .ttf files to $HOME/.local/share/fonts/

  3. Check the installed fonts:

fc-list

Neovim

Install Neovim

1. Install from source

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

Refer to Building Neovim

2. Install the symbolic links

nvim_bin="/usr/local/bin/nvim"
sudo update-alternatives --install /usr/bin/vi vi "$nvim_bin" 50
sudo update-alternatives --install /usr/bin/vim vim "$nvim_bin" 50
sudo update-alternatives --install /usr/bin/editor editor "$nvim_bin" 50

Install plugins

:PackerSync

Utilities

sudo apt install ranger  # File manager
sudo apt install highlight  # Syntax highlight when previewing
sudo apt install flameshot  # Screenshot
sudo apt install sxhkd  # Custom hotkey
sudo apt install picom  # Compositor
sudo apt install rofi  # Application launcher
sudo apt install betterlockscreen  # Lockscreen

ueberzugpp

jstkdng/ueberzugpp: Drop in replacement for ueberzug written in C++

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install jstkdng/programs/ueberzugpp

Modern unix commands

ibraheemdev/modern-unix: A collection of modern/faster/saner alternatives to common unix commands.

1. fzf

junegunn/fzf: 🌸 A command-line fuzzy finder

sudo apt install fzf

2. ag

ggreer/the_silver_searcher: A code-searching tool similar to ack, but faster.

sudo apt install silversearcher-ag

3. lsd

lsd-rs/lsd: The next gen ls command

sudo apt isntall lsd

4. bat

sharkdp/bat: A cat(1) clone with wings.

sudo apt install bat

5. delta

dandavison/delta: A syntax-highlighting pager for git, diff, and grep output

git config --global --add include.path "~/.config/delta.gitconfig"

6. zoxide

ajeetdsouza/zoxide: A smarter cd command. Supports all major shells.

curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash

7. procs

dalance/procs: A modern replacement for ps written in Rust

8. duf

muesli/duf: Disk Usage/Free Utility - a better 'df' alternative

sudo apt install duf

9. dust

bootandy/dust: A more intuitive version of du in rust

Git

Install tig

git clone git@github.com:jonas/tig.git
cd tig
sudo make install prefix=/usr/local
sudo make install-doc prefix=/usr/local  # Install the docs

WPS

WPS honors screen DPI by default. However, export QT_SCALE_FACTOR=1.3 will cause some UI issues. To disable the global scale for WPS, you may write unset QT_SCALE_FACTOR to /usr/bin/wps. What's more, WPS can be scaled with QT_FONT_DPI=240 wps

About


Languages

Language:Shell 54.8%Language:Lua 39.6%Language:Emacs Lisp 4.2%Language:Python 0.9%Language:Vim Script 0.5%