https://github.com/heraldofsolace/homesweethome
A dotfile manager written in C++.
https://github.com/heraldofsolace/homesweethome
cpp cpp17 cpp20 dotfiles dotfiles-linux linux
Last synced: about 2 months ago
JSON representation
A dotfile manager written in C++.
- Host: GitHub
- URL: https://github.com/heraldofsolace/homesweethome
- Owner: heraldofsolace
- Created: 2021-03-04T02:14:12.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-08T03:43:23.000Z (about 5 years ago)
- Last Synced: 2025-03-16T21:32:35.545Z (over 1 year ago)
- Topics: cpp, cpp17, cpp20, dotfiles, dotfiles-linux, linux
- Language: C++
- Homepage:
- Size: 2.66 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# HomeSweetHome
[](https://github.com/twpayne/heraldofsolace/HomeSweetHome)
A dotfile manager written in C++.
**Warning: Use at your own risk. I will not be held responsible if you break your setup.**
The code is not optimal. You can contribute by improving it.
## QuickStart
1. Initialize:
```shell
home_sweet_home init
```
This will set the source directory to `.local/share/home_sweet_home` and target directory to `~`
2. Add a file:
```shell
home_sweet_home add ~/.bashrc
```
This will copy `~/.bashrc` to `bashrc##hidden` in the source directory.
3. Edit:
```shell
home_sweet_home edit ~/.bashrc
```
This will edit the copy stored in source directory and not the actual file.
4. Apply when ready:
```shell
home_sweet_home apply ~/.bashrc
```
This will copy the updated file to the target directory.
5. (Optional) Add a template
```shell
home_sweet_home add ~/test -t
```
This will add the file `test` as a template with `.tmpl` extension.
```shell
home_seet_home edit ~/test
```
Put "Hello I am {{username}}" in the file and save.
```shell
home_sweet_home apply ~/test
```
Now `~/test` contains "Hello I am <your username here>".
To see the available data run
```shell
home_sweet_home data
```
The templating uses [Inja](https://github.com/pantor/inja) syntax.
6. Forget a managed file:
```shell
home_sweet_home forget ~/.bashrc # Add -f flag to not get prompted
```
By default, this will only delete **the managed copy in source directory** and not the one in target directory. Add
the "-r" flag to also remove the one in target directory.
## Installation
Coming soon.
## Donate
[](https://ko-fi.com/J3J53WCCI)
