An open API service indexing awesome lists of open source software.

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++.

Awesome Lists containing this project

README

          

# HomeSweetHome

[![GitHub Release](https://img.shields.io/github/release/heraldofsolace/homesweethome.svg)](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

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J53WCCI)
Donate using Liberapay