Skip to content

🔧 My dotfiles on  macOS for Neovim, Zsh, kitty, lf, etc

Notifications You must be signed in to change notification settings

alokehpdev/dotfiles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.dotfiles

My dotfiles for macOS and Linux. Just cherry pick the piece of code you totally understand.

platform last commit

image

Features

Neovim: The text editor I've been in love with

Zsh: Shell

  • Use Zim to manage Zsh plugins
  • The prompt theme is Powerlevel10k
  • fzf: Fuzzy finder I use widely in my daily workflow. I created some fzf-based scripts to boost productivity
  • bin: Very useful scripts

kitty/alacritty: Terminal

yabai and skhd: Tiling window manager

lf/vifm/ranger: Console file manager

karabiner-Elements: keyboard customizer

  • Caps Lock as Esc and L-Ctrl
  • R-Command as HYPER key
  • L-Ctrl as MEH key

How I am managing the dotfiles

Using a bare repository. The dotfiles can reside where they are. No symlinks needed.

Initial setup

Create a bare repository to store the history.

git init --bare $HOME/dotfiles

Create an alias in zshrc, tell Git where the history and the working tree (snapshot) live.

alias cfg='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'

Tell Git not to show all the untracked files, otherwise all files under $HOME will be shown when running git status.

cfg config status.showUntrackedFiles no

Set up the remote repository for syncing

cfg remote add origin https://github.com/xxx/dotfiles.git

Done! Now we can manage our dotfiles.

cfg status
cfg add ~/.config/zsh
cfg commit -m "zsh config"
cfg push origin master

Clone to another machine

Clone the dotfiles into a bare repository.

git clone --bare https://github.com/xxx/dotfiles.git $HOME/dotfiles

Checkout the actual content from the bare repository to $HOME.

git --git-dir=$HOME/dotfiles/ --work-tree=$HOME checkout

Done!

Notes

If using vim-fugitive in Neovim, to make it work with this bare repo correctly, we should modify ~/dotfiles/config as below

...

[core]
  bare = false
  worktree = /Users/rockyzhang/

...

About

🔧 My dotfiles on  macOS for Neovim, Zsh, kitty, lf, etc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 66.3%
  • Lua 16.5%
  • Vim Script 14.4%
  • Python 2.8%