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

feat!: extend the available styles for mode by separating mode from the separator styles #1953

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Nov 26, 2024

An implementation of the feature request: #732, #1228

Closes #732, #1228


Previously, only a single mode style was supported, which meant the same mode style was used for both the highlight and secondary colors, and the separator style was applied to the secondary color.

This led to the inability to set different styles for the primary color of the mode, and users couldn't control the mode style independently because it depended on the separator style.

This PR separates the mode from the separator style, making it its own distinct style. Users will now be able to set different main and alternate styles for each of the 3 modes individually.

⚠️ Breaking changes

mode_normal, mode_select, mode_unset, and separator_style have been separated into a new, independent [mode] section:

  • normal_main - Main style for the normal mode
  • normal_alt - Alternate style for the normal mode
  • select_main - Main style for the select mode
  • select_alt - Alternate style for the select mode
  • unset_main - Main style for the unset mode
  • unset_alt - Alternate style for the unset mode

permissions_t, permissions_r, permissions_w, permissions_x, and permissions_s have been renamed to perm_type, perm_read, perm_write, perm_exec, and perm_sep to improve readability and align with the naming conventions in #1761.

@sxyazi sxyazi merged commit b692bc9 into main Nov 26, 2024
6 checks passed
@sxyazi sxyazi deleted the pr-2d656402 branch November 26, 2024 08:54
sxyazi added a commit that referenced this pull request Nov 26, 2024
sxyazi added a commit that referenced this pull request Nov 26, 2024
sxyazi added a commit to yazi-rs/flavors that referenced this pull request Nov 26, 2024
@boydaihungst
Copy link
Contributor

I noticed you changed theme.toml to theme-base.toml. I tried changing it to theme-base.toml as well, but only theme.toml works. Is this a bug, or are we still using theme.toml?

boydaihungst added a commit to boydaihungst/relative-motions.yazi that referenced this pull request Nov 26, 2024
@sxyazi
Copy link
Owner Author

sxyazi commented Nov 26, 2024

User config file is always theme.toml and unchanged:

# If the user's terminal is in dark mode, Yazi will use the content from `theme-base.toml` + `theme+dark.toml` as the default theme;
# if it's in light mode, use `theme-base.toml` + `theme+light.toml` instead.
# Users can always override and adjust the default theme in their own `theme.toml` configuration file.

@asim215
Copy link
Contributor

asim215 commented Nov 26, 2024

@sxyazi Thank you, for your effort to implement this! I appreciate it. 👍 ❤️

@sxyazi sxyazi mentioned this pull request Dec 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants