Skip to content

Cyber-Syntax/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My personal dotfiles

I've moved to using GNU Stow for my personal dotfiles maintenance instead of a bare repository.

How to setup GNU Stow for your dotfiles?

Caution

Backup your files!

Always cd ~/dotfiles dir before any stow command

Automatic setup with shell script

Note

setup option:

This would move your dotfiles to ~/dotfiles It would show preview of changes before applying them

  • For .config files: ~/.config/nvim to ~/dotfiles/dot-config/nvim
  • For dot files: ~/.vim to ~/dotfiles/dot-vim
  • For dot files: ~/.zshrc to ~/dotfiles/dot-zshrc

Note

deploy option:

This would deploy your dotfiles to your home directory It would show preview of changes before applying them

  • This using stow to deploy your files.
  • Command used for preview: stow -n -v --dotfiles --target="$HOME" .
  • Command used for deploy: stow -v --dotfiles --target="$HOME" .
# Make the setup script executable
chmod +x setup.sh

# Run the setup script
./setup.sh --setup

# This would deploy your dotfiles to your home directory
./setup.sh --deploy

# This would initialize git repository in your dotfiles directory
./setup.sh --init-git

Manual Setup

  1. Create folder ~/dotfiles
  2. initialize git repo
echo "# dotfiles" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Cyber-Syntax/dotfiles.git
git push -u origin main
  1. Make folder for ~/.config
mkdir -p ~/dotfiles/dot-config/
  1. Copy your configs
cp -r ~/.config/nvim ~/dotfiles/dot-config/
  1. test stow dry without change anything to make sure about changes correct
cd ~/dotfiles &
stow -n -v --dotfiles --target="$HOME" .
  1. If everythings work perfect, stow your files
cd ~/dotfiles &
stow --dotfiles --target="$HOME" .
  1. Alias for stow ~/dotfiles/.stowrc:
--dotfiles
--target="$HOME"
--ignore=.stowrc
  1. stow files to symlink
cd ~/dotfiles &
stow .

About

Personal dotfiles for nvim, zsh and gnu stow auto setup script.

Topics

Resources

Stars

Watchers

Forks