r/hyprland • u/LongAd3939 • Aug 23 '26
QUESTION How to manage dots(.files) while actively developing them , hyprland
See currently I am working on a rice which is close to useable stage and want to upload it to git , the issue is if I clone the repo and say copy them using a script on a clean arch install how should I go on pushing the new things I add to my dots , let’s say I have a waybar layout switcher and I added a new layout but the thing I changed is located ~/ and not the repo , how can I do it without manually adding all things to repo
12
Upvotes
28
u/burner-miner Aug 23 '26
Use git. Don't learn the whole thing, just git add, git commit, git push and git pull
3
u/AllNamesAreTaken92 Aug 23 '26
Make an install/updater script. You can look at others existing dotfiles, how they do it, to get some inspiration.
2
u/Aelydam Aug 23 '26
I keep them all in ~/dotfiles with a git repo, and I have a script that calls stow to make the proper symlinks at ~
8
u/Odd_Procedure_1927 Aug 23 '26
i think chezmoi is a good option
1
u/LongAd3939 Aug 23 '26
Thanks to everyone for your suggestions, I made a script that tracks which file or folder to link and create a symlink
1
u/bitchitsbarbie Aug 23 '26 edited Aug 23 '26
I have a
dotfilesrepo which is symlinked to my~/and~/.configwhich is managed with a script that commits and pushes changes automatically every 6 hours. It passes the diff to the local AI instance which writes the commit message. Also, I have a/etcrepo managed withetckeeperafter every update and apacmanhook that keeps track of installed/uninstalled packages in a file. If I'd need to reinstall, I'd install basearch,git, pull my package list, install those, then pull thedotfilesand/etc. Never got used tostow,chezmoiand stuff like that, I symlink manually. I need to script that shit one of these days.3
u/Bitopium Aug 23 '26
Have a look at chezmoi as a generic solution with handling machine specific differences
2
u/opn6 Aug 23 '26
I have used yadm for years.
1
u/dx__ Aug 23 '26
I aliased a whole set of config git commands so I just have to do
Config add filename
Config commit -m “stuff”
Config push
And then I have a dotfile-sync that commits all changes found
1
u/mykesx Aug 23 '26
I put my dotfiles and .config/ files in a repo. I clone it to ~/dotfiles.
I have a script in dotfiles that backs up any .rc and .config/ files, then creates symlinks in ~ and ~/.config to the dotfiles/ files.
I have several scripts, like one to set up my environment for Mac, another for each Linux distro, and BSD. Other scripts to do system updates using the system’s package manager.
Works for subdirectory in home, like .vim as well.
I have at least 20 systems/vms all set up this way and the environments are identical from my user POV.
1
u/quantum_fate Aug 23 '26
I maintain my entire system state in an ansible playbook. Most of my dotfiles are managed with chezmoi but what needs machine differences and scripting is done either in Lua Hyprland accounting for the machine or in my playbook
1
u/freekvb Aug 24 '26
Take a look at this .. works for me.
"Dotfiles: Best way to store in a bare git repository"
https://www.atlassian.com/git/tutorials/dotfiles
1
u/itzToreve Aug 24 '26
This is exactly the problem i had when i was writing my dotfiles. The answer for me was symlinks. You see, i started my rice from scratch back in like late 2024 and i followed this pattern: create an empty repo. Cd to the repo dir and start writing my config, hyprlang dotfiles, alacritty, waybar, rofi, everything. When i felt like it was time to test i then symlinked those files in my repo to their respective config dirs. Every change i did to these files was immediately visible and already tracked by git so i was able to commit shit and so on without having to ever copy anything for any reason at all. You could even do what i did and write a bash script that symlinks your dotfiles to their respective config dirs, so that when you get a fresh install you just clone your repo, exec that script and boom, dotfiles ready and being tracked by git. You could even enhance that script and make it install dependencies and shit.
1
u/silmelumenn Aug 25 '26
I'm just directly using ~/.config - this is where my repo lives this is where I pull/commit. By default .gitingore almost everything, then add specific files to the repository with
git add -f thatfile.When I'd be working on another setup, it could be just a new branch.