rajasegar / alacritty-themes

:rainbow: :lollipop: Themes :candy: :heart_eyes: for Alacritty: A cross-platform GPU-accelerated Terminal emulator
MIT License
685 stars 70 forks source link

Too many backups #165

Closed alexmailo closed 1 year ago

alexmailo commented 1 year ago

Describe the bug

Looks like every time it runs, it creates a backup file for some reason. Was wondering if that is necessary or is it a bug?

To Reproduce

Steps to reproduce the behavior:

  1. Installation
  1. Run alacritty-themes
  1. See error

Expected behavior

Just run normally without creating multiple backup files

Operating System:

Add your alacritty.yml content

font:
  size: 14
  normal:
    family: Fira Code Medium
    # in terminal of angela
    # family: Monaco
    # family: Cousine
    style: Regular
  offset:
    x: 0
    y: 5
shell:
  program: /bin/zsh
traw_bold_text_with_bright_colors: false
window:
  # requires compositor running
  opacity: 1
  padding:
    x: 10
    y: 10
cursor:
  style:
    shape: Beam
    blinking: On
import:
  - ~/.config/alacritty/themes/challenger-deep.yml
colors:
  name: 3024 (dark)
  author: Chris Kempson
  primary:
    background: "#090300"
    foreground: "#a5a2a2"
  cursor:
    text: "#090300"
    cursor: "#a5a2a2"
  normal:
    black: "#090300"
    red: "#db2d20"
    green: "#01a252"
    yellow: "#fded02"
    blue: "#01a0e4"
    magenta: "#a16a94"
    cyan: "#b5e4f4"
    white: "#a5a2a2"
  bright:
    black: "#5c5855"
    red: "#db2d20"
    green: "#01a252"
    yellow: "#fded02"
    blue: "#01a0e4"
    magenta: "#a16a94"
    cyan: "#b5e4f4"
    white: "#f7f7f7"
theme: 3024.dark

Screenshots

alacritty-themes

JuanVqz commented 1 year ago

Hey @alexmailo thank you for opening the issue, we are creating backups because some users have ran on corrupted alacritty.yml file.

We are aware of you will ended up with several backup files but we didn't agree in the best way to manage them, should we remove all of them and keep the last backup? What happen if the last backup is corrupted and we removed the good one? That's the reason for now we think it's easy to the user remove them manually with the following command rm ~/.config/alacritty/

Do you have any idea to improve it?

Best!

alexmailo commented 1 year ago

HI @JuanVqz , thanks for the quick response.

Other than that I love this app and am probably going to make a PR with some new themes if that is okay.

JuanVqz commented 1 year ago

HI @JuanVqz , thanks for the quick response.

* Me personally, I wouldn't even allow the user to run the script on a corrupted `alacritty.conf`. I would probably throw an error saying that the config is corrupted or something, and let them solve it. After all, it is not your fault they got a corrupted config file.

* With respect to the backups, I think that having the user remove backups manually is not an option as it will get chaotic (as in probably thousands of backups) and that there should only be one backup in case the user regrets applying the changes, but that is just my opinion.

Probably, we are breaking the alacritty.yml when changing themes faster here you have the related issue https://github.com/rajasegar/alacritty-themes/issues/131

Other than that I love this app and am probably going to make a PR with some new themes if that is okay.

Nice, themes are pretty welcome

JuanVqz commented 1 year ago

I'll add a flag to remove backups, in the mean time I'll close this issue, if you have an idea how to manage backups feel free to open a new issue, thank! 😉