Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

This library broke alacritty and deleted my config.. 馃憥馃憥馃憥馃憥 #131

Closed
joe-narvaez opened this issue May 8, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@joe-narvaez
Copy link

:(

@joe-narvaez joe-narvaez added the bug Something isn't working label May 8, 2022
@JuanVqz
Copy link
Collaborator

JuanVqz commented May 9, 2022

hey, @joe-narvaez I'm sorry about that 馃檹 , we may solve it did you remember what did you do when it happened?

@h45h1r
Copy link

h45h1r commented Jun 14, 2022

I've had the same issue where it replaced my whole config with the alacritty-themes colors

@rajasegar
Copy link
Owner

I think we should give some sort of escape hatch to the users if we have problems like these. May be something like always creating a backup for the config file, before modifying it for preview and apply themes. So the users can just rename/move/copy the backup file to restore the settings.
@joe-narvaez @h45h1r Sincere apologies for the inconvenience caused.
@JuanVqz What are your thoughts?

@rajasegar
Copy link
Owner

rajasegar commented Jun 14, 2022

Just outlining the steps here:

  • Create a backup file in the same config directory with timestamp to ensure that we are not overwriting any existing backups
  • Add documentation to README about the steps to how to restore the original config

The backup file name could be something like alacritty.yml.1655203789963.bak
so that the user can restore it by

$ mv alacritty.yml.1655203789963.bak alacritty.yml

The downside is, we will be creating a lot of backup copies. But the user can still be able to clear out these files.

@h45h1r
Copy link

h45h1r commented Jun 14, 2022

The downside is, we will be creating a lot of backup copies. But the user can still be able to clear out these files.

What if you create a backup file and delete the older versions of the backup each time.

@JuanVqz
Copy link
Collaborator

JuanVqz commented Jun 14, 2022

yes, I agreed. creating a backup could work.

Aside note:I think this error is showing up when you are moving between themes fast.

@h45h1r
Copy link

h45h1r commented Jun 14, 2022

Aside note:I think this error is showing up when you are moving between themes fast.

Yes, I changed the theme a few times before this happened

@JuanVqz
Copy link
Collaborator

JuanVqz commented Jun 19, 2022

I think we should give some sort of escape hatch to the users if we have problems like these. May be something like always creating a backup for the config file, before modifying it for preview and apply themes. So the users can just rename/move/copy the backup file to restore the settings.

@joe-narvaez @h45h1r Sincere apologies for the inconvenience caused.

@JuanVqz What are your thoughts?

@rajasegar I'm thinking users will end up in the same scenario if we create a backup each time they select a new theme. We may create corrupt backups.

What about to add the option: alacritty-themes --backup and let them use it when they want.

@rajasegar
Copy link
Owner

rajasegar commented Jun 20, 2022

No no, not each time they select a new theme, but only one time when they invoke the program even before showing the prompts.

@JuanVqz
Copy link
Collaborator

JuanVqz commented Jun 20, 2022

No no, not each time they select a new theme, but only one time when they invoke the program even before showing the prompts.

sounds good! I'll check it

JuanVqz added a commit to JuanVqz/alacritty-themes that referenced this issue Jun 22, 2022
This will be called once the `alacritty-themes` command gets executed.

Related rajasegar#131
JuanVqz added a commit to JuanVqz/alacritty-themes that referenced this issue Jun 22, 2022
This will be called once the `alacritty-themes` command gets executed.

Related rajasegar#131
JuanVqz added a commit to JuanVqz/alacritty-themes that referenced this issue Jun 22, 2022
This will be called once the `alacritty-themes` command gets executed.

Related rajasegar#131
JuanVqz added a commit that referenced this issue Jun 24, 2022
This will be called once the `alacritty-themes` command gets executed.

Related #131
github-actions bot pushed a commit that referenced this issue Jun 24, 2022
## [4.4.1](v4.4.0...v4.4.1) (2022-06-24)

### Features

* **cli:** Add createBackup method ([#157](#157)) ([ffe2abf](ffe2abf)), closes [#131](#131)
@JuanVqz JuanVqz mentioned this issue Jul 17, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants