| ▲ | jdshaffer 2 days ago | |||||||
If you don't mind, I'd like to hear more about your setup. I have a bunch of bash scripts and python programs I've used to make working in the terminal easier (and more fun). Are you saving your dotfiles are a git project and then just syncing and pulling them down from there? I'm not an expert, just a tinkerer, but I like tinkering in the terminal. :) Thanks in advance! | ||||||||
| ▲ | herewulf a day ago | parent | next [-] | |||||||
Not the parent but a project (glorified Bash script) called vcsh[1] has served me well over the years for managing multiple Git repositories containing my dotfiles (separation of concerns). Lately I have migrated some of that to Guix Home because the other half of the problem is having all the dependent programs necessary for the dotfiles installed automatically at the appropriate versions. The latter one especially falls into the realm of tinkering. :) [1]: https://github.com/RichiH/vcsh [2]: https://systemcrafters.net/craft-your-system-with-guix/guix-... | ||||||||
| ||||||||
| ▲ | godelski a day ago | parent | prev [-] | |||||||
Yeah my dotfiles, notes, and scripts are in a single repo. I think the most important thing to do is organize. I just match the system. So I put everything that a rc file in ~/ in one directory and everything in ~/.config in another. Then if you have your repo downloaded all you need is to run 2 find commands like this
It baffles me that people are so unorganized in their dotfiles. A little goes a long way to making your life easier. But then again people suck at bash so they're probably not thinking of using find this way. You could also use xargs to parallelize if you want but there'd be no practical speed difference for meAnother key component is to break out files. For example I have the directory ~/.dotfiles/rc_files/zsh. My zshrc file sources different files from that location. So I have a Linux file and OSX file there for anything that is specifically system dependent. If you want different configs on different machines you can check the hostname and use the same pattern! Speaking of which, use functions! At first this is going to sound crazy but it's worth the effort and let's be honest, the effort is very low (though the initial rebase might not be depending on how messy you are)
Yeah, it is a bit more cumbersome but it's really not that bad and
Following Unix philosophy has more advantages than disadvantages. I also strongly suggest adding comments because you'll forget why you did something. I'll often link to posts for this and for giving credit.Since we're speaking of bash, bookmark this website: https://mywiki.wooledge.org/BashPitfalls Fwiw, my main language is Python but for pretty much everything in the terminal I write in bash. You can often make oneliners that would traditionally be a lot of lines in Python. Not to mention it's usually faster. It's a good way to help you learn bash too! ^__^ | ||||||||
| ||||||||