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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make user config the default config #90

Open
okmanideep opened this issue Apr 30, 2024 · 2 comments
Open

Make user config the default config #90

okmanideep opened this issue Apr 30, 2024 · 2 comments

Comments

@okmanideep
Copy link

Is your feature request related to a problem? Please describe.
Currently having to pass -c user every time. Also for some reason freeze -c user is slower compared to freeze (Checked with ls | freeze)

Describe the solution you'd like
Make $XDG_CONFIG/freeze/user.json the default config when no config is passed

Describe alternatives you've considered
NA

Additional context
MacOS 14.4.1 (23E224), installed via brew install charmbracelet/tap/freeze

@AlejandroSuero
Copy link

@okmanideep when testing out the changes for #107 I realised that even when using freeze -c full still takes a lot of time but if you output it to .svg it will create it instantly both with -c user or -c full.

My assumption here is that to encode the .png image, takes a lot of time if is not the base config.

I logged out the time between getting the config and parsing the json, here are the results:

  • Using -c full:
Screenshot 2024-06-11 at 15 04 36
image from command

full

  • Using -c user:
Screenshot 2024-06-11 at 15 06 00
image from command

user

my user.json
{
  "background": "#171717",
  "margin": [
    0,
    0,
    0,
    0
  ],
  "padding": [
    0,
    0,
    0,
    0
  ],
  "window": false,
  "title": {
    "title": "auto",
    "position": "center"
  },
  "width": 0,
  "height": 0,
  "config": "default",
  "theme": "dracula",
  "wrap": 0,
  "border": {
    "radius": 0,
    "width": 0,
    "color": "#515151"
  },
  "shadow": {
    "blur": 0,
    "x": 0,
    "y": 0
  },
  "font": {
    "family": "JetBrains Mono",
    "file": "",
    "size": 14,
    "ligatures": true
  },
  "line_height": 1.2,
  "show_line_numbers": false
}

@AlejandroSuero
Copy link

Additionally if you want the conversion to be faster, consider downloading librsvg, this makes it drop from 31.4s to 1.3s.

On MacOS you can use brew install librsvg.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants