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

If distro is forced to be arch, it shows the flags weird #351

Open
1 task done
sctech-tr opened this issue Sep 6, 2024 · 7 comments
Open
1 task done

If distro is forced to be arch, it shows the flags weird #351

sctech-tr opened this issue Sep 6, 2024 · 7 comments

Comments

@sctech-tr
Copy link

sctech-tr commented Sep 6, 2024

Describe the bug

if i force the distro to be arch and select the non-binary flag, it shows a weird combination.

  • Does this issue still occur in the master branch? (Required)

Expected behavior

i expected it to look like the fedora logo coloring (see below)

Screenshots

bug:

very weird

expected:

expected

Config file

Please paste the content of ~/.config/hyfetch.json below:

{
    "preset": "nonbinary",
    "mode": "rgb",
    "light_dark": "dark",
    "lightness": 0.65,
    "color_align": {
        "mode": "horizontal",
        "custom_colors": [],
        "fore_back": [
            2,
            1
        ]
    },
    "backend": "fastfetch",
    "args": null,
    "distro": null,
    "pride_month_shown": [],
    "pride_month_disable": false
}

Additional context

@sctech-tr
Copy link
Author

Update: It does still happen in the development version.

@sctech-tr
Copy link
Author

Update: It does not happen on an arch linux vm (see below)
resim
so it is probably the --distro flag that is causing the issue.

@sctech-tr sctech-tr changed the title non-binary coloring broken on arch linux If distro is forced to be arch, it shows the non-binary flag weird Sep 13, 2024
@sctech-tr
Copy link
Author

It also happens right now, at the master branch.
resim

@luna-1024
Copy link
Contributor

Try deleting the fore_back section of the config. (Note this will affect the Fedora rendering, so maybe back it up.)

The foreground/background setting is dependent on the distro and saved in the config, but is not overridden when you change the distro with the --distro argument (or distro field in the config).

To me it seems to be a design flaw that many other distros do not render fully correctly when testing them on the command line due to the way foreground/background support is implemented.

On improving this, I think:

  • Foreground/background is more a distro associated property than a coloring one, so where it goes in the config should be moved.
  • We could leave out specifying background entirely, as it is just what is not the foreground. And foreground can be a list.
  • Do not save the default into config. Just use null to mean default.
  • We maybe do not actually need this to be user configurable (a config field) at all.

@sctech-tr sctech-tr changed the title If distro is forced to be arch, it shows the non-binary flag weird If distro is forced to be arch, it shows the flags weird Oct 8, 2024
@sctech-tr
Copy link
Author

it happens in most flags

@hykilpikonna
Copy link
Owner

hykilpikonna commented Oct 18, 2024

TLDR: You need to do hyfetch -c --distro arch to reconfigure colors before you use hyfetch --distro arch.

Ok this issue happens because the foreground-background color configuration is stored in the config file and the default value depends on the distro icon during configuration. For Fedora, the default should be fore-back, but for arch, the default should not. However, you only overwritten the distro flag and are still using Fedora's fore-back configuration.

We maybe do not actually need this to be user configurable (a config field) at all.

@luna-1024 Yea that would make more sense.

@sctech-tr
Copy link
Author

sctech-tr commented Oct 19, 2024

that makes sense

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

3 participants