Personal dotfiles repository for my Arch Linux (I use Arch, btw) setup.
This repo manages my whole custom environment using a bare Git repository with '$HOME' as the working tree.
The general system where this is running:
- OS: Arch Linux
- Shell: zsh
- WM: Hyprland
- Notification center: Sway.
All the elements this repo manages (that could be also considered as requisites) can be listed as follows:
- Whole modular
Hyprlandbase configuration. - Hypr-Ecosystem!
hypridle,hyprlockandhyprpaper. nvimfiles editor withlazy.nvim.kittyterminal emulator.waybarconfig.woficonfiguration for applitacion manager.fuzzelconfiguration to work as clipboard.starshipprompt.ewwcustom widgets.
Other necessary things involved in the environment:
xpdfpdf viewer.feathernotesnote application..fnxfeathernotes template. (Documents/Notas/template.fnx)themedirectory. (.config/theme/)- Necessary
iconscollection for the theme. (.config/icons/) - Necessary custom
shell scriptsfor updating environments. (.config/sh-scripts/)
Clone the repository as a bare repo:
git clone --bare https://github.com/Oscar-Cabr/Dotfiles.git $HOME/.dotfilesDefine the alias.
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'Hide untracked files:
dotfiles config --local status.showUntrackedFiles noOnce the alias is set up, you can replace the git word to dotfiles in your workflow and use it as you would usually do:
dotfiles status, dotfiles add file, dotfile commit -m "my commit", dotfile push...
Warning
Do never use dotfiles add . since this' a bare repository.
In the new machine:
git clone --bare git@github.com:TUUSUARIO/dotfiles.git $HOME/.dotfilesDefine alias:
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'Hide untracked:
dotfiles config --local status.showUntrackedFiles noFinally, chekcout:
dotfiles checkoutIf there's any conflict while doing so:
dotfiles checkout -b laptop
dotfiles add ~/.config/hypr/monitors.conf
dotfiles commit -m "Laptop monitor layout"When managing dotfiles with a bare repository, you cannot use normal git commands directly, because the working directory is not inside a repository.
To solve this, we create a Git alias that tells Git two things every time it runs:
- Where the bare repository (usually, the
.gitdirectory) lives.--git-dir=$HOME/.dotfiles/ - Where the working tree (your real files) is.
--work-tree=$HOME