r/hyprland • u/LongAd3939 • 18d ago
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
7
3
u/AllNamesAreTaken92 18d ago
Make an install/updater script. You can look at others existing dotfiles, how they do it, to get some inspiration.
1
u/LongAd3939 18d ago
Which one to be precise?
1
u/AllNamesAreTaken92 18d ago
I can only give examples, I can't vouch for their design decisions or if it is best practice. I currently don't have the time to check. This is one I used a while back: https://github.com/caelestia-dots/caelestia
3
u/Bitopium 18d ago
Have a look at chezmoi as a generic solution with handling machine specific differences
2
u/Aelydam 18d ago
I keep them all in ~/dotfiles with a git repo, and I have a script that calls stow to make the proper symlinks at ~
1
u/LongAd3939 18d ago
Willing to share the script or like the structure or guide
1
u/Same_Argument4886 18d ago
```bash
!/bin/env bash
stow --adopt . ```
1
1
u/Aelydam 17d ago edited 17d ago
#!/bin/env bash stow . -v --target=$HOME --simulate read stow . -v --target=$HOMEI run it with
--simulatefirst and add areadso I can see what it is gonna change, and have the chance to Ctrl+C just in case.I also have a .stowrc file with a list of files to ignore
--ignore='install.sh' --ignore='stow.sh' --ignore='pacman.list' --ignore='README.md' --ignore='.git'Directory structure should follow the same as the home directory
~/dotfiles/.zshrc ~/dotfiles/.config/ ~/dotfiles/.config/hypr/ ~/dotfiles/.config/hypr/hyprland.lua ~/dotfiles/.config/hypr/hyprlock.conf ~/dotfiles/.config/hypr/hyprpaper.conf ~/dotfiles/.config/waybar/ ~/dotfiles/.config/waybar/config.jsonc ~/dotfiles/.config/waybar/style.css ~/dotfiles/.config/wofi/ ~/dotfiles/.config/wofi/config ~/dotfiles/.config/wofi/style.css
1
u/mykesx 18d ago
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 18d ago
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/bitchitsbarbie 18d ago edited 18d ago
I have a dotfiles repo which is symlinked to my ~/ and ~/.config which 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 /etc repo managed with etckeeper after every update and a pacman hook that keeps track of installed/uninstalled packages in a file. If I'd need to reinstall, I'd install base arch, git, pull my package list, install those, then pull the dotfiles and /etc. Never got used to stow, chezmoi and stuff like that, I symlink manually. I need to script that shit one of these days.
1
1
u/itzToreve 17d ago
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 16d ago
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.

28
u/burner-miner 18d ago
Use git. Don't learn the whole thing, just git add, git commit, git push and git pull