dotfiles/.dotfiles
2023-06-18 12:00:02 +02:00
..
LICENSE Fixes rmdir not working anymore due to remaining empty directories 2020-04-15 10:23:06 +02:00
README.md [NANO] & [TERMINATOR] Updates configurations according to Debian 12+ 2023-06-18 12:00:02 +02:00

dotfiles

Some explanations

I was so bored of having a "Git project" into my $HOME/ directory, so this is the workaround from now :

  • The .dotfiles/ folder you see above is in the $HOME/ directory

  • It contains .git's internals, as long as LICENSE and README.md files

  • With the procedure below, we are able to set the Git working tree elsewhere than its original location (~/.dotfiles/)

This "method" is a very good compromise to avoid :

  1. Git bare folder solutions

  2. Dot files aliases directly set in $HOME/ directory

  3. A non-versioning setup, 'cause Git is a pain to use in such conditions

Installation

Each step is commented and has been tested many times 😉

# Install concerned packages :
apt install zsh fzf git git-lfs terminator nano htop neofetch

# Install required dependencies :
apt install rsync fonts-powerline
# ... and then (manually) install :
# * MesloNLG Nerd Font : <https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k> (copy .TTF files under /usr/share/fonts/truetype/meslo/ if you don't have a tool to install them automatically)
# * Archey 4 : <https://github.com/HorlogeSkynet/archey4/releases>
# * Bat : <https://github.com/sharkdp/bat/releases>
# * PrettyPing : <https://github.com/denilsonsa/prettyping>
# * Sublime Text : <https://www.sublimetext.com/docs/linux_repositories.html#apt>

# Move to your home directory
# Don't worry, it'll stay clean afterwards !
cd

# Fetch this repository
git clone https://git.forestier.app/HorlogeSkynet/dotfiles.git

# We'll need this to match hidden files...
shopt -s dotglob

# Let's move out all of its content
rsync -ar --remove-source-files dotfiles/ ./
# ... but care : Git's internals have to be ELSEWHERE !
mv .git/ .dotfiles/

# We won't need it anymore...
rm -rf dotfiles/

# Let's go inside this hidden folder 😨
cd .dotfiles/

# Let's tweak Git configuration just a bit
git config --local core.worktree ../..
git config --local status.showUntrackedFiles no

# Verify that everything is correct
git status

Working with this configuration

In order to commit some modifications, just go to ~/.dotfiles, and act like it was a "regular Git project".
For instance, to add new dot files, run something like :

git add ../.<dot_file_name>
git commit #...