Skip to content

Conversation

@PFiS1737
Copy link
Contributor

@PFiS1737 PFiS1737 commented Feb 10, 2025

Close: #2312

Description

  • Add configurations for status line separator and format
    • sep_left = { open = "", close = "" }
    • sep_right = { open = "", close = "" }
    • format_percent = [ "Top", "%2d%%", "Bot" ]
    • format_position = "%2d/%-2d"
    • format_mode = "%.3s"

Checklist:

  • make another PR to update the docs

@PFiS1737 PFiS1737 closed this Feb 10, 2025
@sxyazi
Copy link
Owner

sxyazi commented Feb 10, 2025

Actually, separator_left and separator_right don't seem to make the theme.toml that much more complicated.

Do you have a screenshot showing what it looks like when different values are set for them?

@PFiS1737
Copy link
Contributor Author

Certainly

1

Example

2
3

@sxyazi
Copy link
Owner

sxyazi commented Feb 10, 2025

That looks great, this will be a nice improvement!

Could you make this PR only include the changes for separator_left and separator_right?

@sxyazi sxyazi reopened this Feb 10, 2025
@PFiS1737
Copy link
Contributor Author

done

@PFiS1737
Copy link
Contributor Author

PFiS1737 commented Feb 10, 2025

I sincerely request you to reconsider whether the formatting-related features can be merged into the main branch. They are not complex and provide convenience for those who want customization. For others, they can simply remain unchanged.

If possible, I will submit another PR. Those changes don’t seem to be breaking.

@PFiS1737 PFiS1737 changed the title feat: enhance status line configuration. feat!: enhance status line separator configuration Feb 10, 2025
@PFiS1737
Copy link
Contributor Author

docs update: yazi-rs/yazi-rs.github.io#203

@sxyazi sxyazi changed the title feat!: enhance status line separator configuration feat!: allow different separators to be applied individually to the left and right sides of the status bar Feb 11, 2025
@sxyazi
Copy link
Owner

sxyazi commented Feb 11, 2025

All look good to me now, and thanks for updating the documentation!

Sorry, I can't accept formatting-related fields for the following reasons:

  1. %2d%% is unclear — without looking at the Lua source code, it's hard to understand the specific data represented by %d.
  2. %2d%% is a Lua-specific syntax, and to configure it, the user would need some knowledge of Lua. This somewhat goes against the idea of keeping TOML and Lua separate — TOML, as an easy-to-use front-end, is meant to provide users with a simplified configuration method.

Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sxyazi sxyazi merged commit a4dde6a into sxyazi:main Feb 11, 2025
6 checks passed
@PFiS1737 PFiS1737 deleted the statusline-enhance branch February 11, 2025 12:30
@PFiS1737
Copy link
Contributor Author

Thanks for your reply, but I’d still like to push for this.

%2d%% is a Lua-specific syntax

In fact, this is the standard C printf syntax (though it does still introduce a connection between TOML and another language, but they are not complex and easy to understand).

%2d%% is unclear

We can clarify the meaning of placeholders and provide a short explanation of this syntax in the documentation.

Additionally, for users who don’t need these formatting options, just keeping these settings at their default values, and the current appearance remains unchanged.

I understand that you have broader considerations. If this update is ultimately unacceptable, I won’t push further on this and will look for alternative solutions.

sxyazi added a commit to yazi-rs/yazi-rs.github.io that referenced this pull request Feb 26, 2025
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 27, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sxyazi/yazi](https://github.com/sxyazi/yazi) | patch | `v25.2.11` -> `v25.2.26` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sxyazi/yazi (sxyazi/yazi)</summary>

### [`v25.2.26`](https://github.com/sxyazi/yazi/releases/tag/v25.2.26)

[Compare Source](sxyazi/yazi@v25.2.11...v25.2.26)

#### Breaking Changes

-   `separator_open` and `separator_close` have been replaced with the new `sep_left` and `sep_right`. sxyazi/yazi#2313
-   The `[completion]` component has been renamed to `[cmp]`. sxyazi/yazi#2399

#### Deprecated

-   `MANAGER`, `PREVIEW`, `PLUGIN`, and `THEME` have been deprecated in favor of the new `rt` and `th`. sxyazi/yazi#2389
-   `ya.manager_emit()` has been deprecated in favor of the new `ya.mgr_emit()`. sxyazi/yazi#2397

#### Built-in Previewer Improvements

-   The JSON previewer will now respect the user's `wrap` setting to support automatic JSON line wrapping. sxyazi/yazi#2337, thanks [@&#8203;boydaihungst](https://github.com/boydaihungst)
-   The PDF previewer will now respect the user's `max_width` setting to address the issue of previewing content that is too small. sxyazi/yazi#2331
-   The ImageMagick previewer will now respect the user's `image_alloc` setting to limit memory usage. sxyazi/yazi#2403

#### New Search Engine: [`rga`](https://github.com/phiresky/ripgrep-all)

sxyazi/yazi#2383 (thanks [@&#8203;paperbenni](https://github.com/paperbenni)) has added a new [`ripgrep-all`](https://github.com/phiresky/ripgrep-all) search engine.

It is a wrapper around `ripgrep` that supports additional file formats (such as PDF, docx, epub, etc.).

You can use it with the `search --via=rga` command.

#### Allow to Specify Layer for Keymap Commands

With sxyazi/yazi#2399, you'll now be able to assign commands from different layers to a keybinding in `keymap.toml`.

This opens up the possibility of interacting with any other component, such as accessing commands from the manager (`[manager]`) within the input component (`[input]`):

```toml
[[input.prepend_keymap]]
on   = "<Esc>"
run  = [ "close", "mgr:escape --filter" ]
desc = "Close input and cancel the filter"
```

When you press `Esc` in the input box to exit the filter view (triggered by the `f` key), the filter will be canceled as the input is closed.

#### More Flexible Status Bar Customization

sxyazi/yazi#2313 (thanks [@&#8203;PFiS1737](https://github.com/PFiS1737)) introduces `sep_left` and `sep_right` to replace the previous `separator_open` and `separator_close` settings, allowing different separators to be set for the left and right sides:

![status-sep-explain](https://github.com/user-attachments/assets/fd61a85d-9823-46d6-a01f-56c99155c630)

#### Support for Setting Spotter Table Styles

sxyazi/yazi#2391 introduces two new settings, `tbl_col` and `tbl_cell`, in `theme.toml` to configure the styles for spotter table columns and cells, respectively.

<img src="https://github.com/user-attachments/assets/f2167e58-96c3-4a66-a244-1150e3e80e43" height="400" />

#### What's Changed
* feat!: allow different separators to be applied individually to the left and right sides of the status bar by @&#8203;PFiS1737 in sxyazi/yazi#2313
* fix: load mount points with the best effort even if the `/dev/disk/by-label` directory does not exist by @&#8203;sxyazi in sxyazi/yazi#2326
* feat: CSI-based Vim and Neovim built-in terminal detection for better accuracy by @&#8203;sxyazi in sxyazi/yazi#2327
* feat: respect the user's `max_width` setting for the built-in PDF preloader by @&#8203;sxyazi in sxyazi/yazi#2331
* feat: respect the user's `wrap` setting for the built-in JSON previewer by @&#8203;boydaihungst in sxyazi/yazi#2337
* refactor: consistent naming for enum variants by @&#8203;sxyazi in sxyazi/yazi#2339
* feat: new `external` and `removable` fields in the `fs.partitions()` API by @&#8203;sxyazi in sxyazi/yazi#2343
* feat: terminal response detection under async stdin by @&#8203;sxyazi in sxyazi/yazi#2347
* fix: incorrect kebab-case for the notify level enum by @&#8203;hankertrix in sxyazi/yazi#2349
* fix: add maximum preview limit under `/proc` virtual file system by @&#8203;sxyazi in sxyazi/yazi#2355
* feat: add a link to the debugging instructions in `yazi --debug` by @&#8203;sxyazi in sxyazi/yazi#2365
* fix: didn't reset previous `Cha` when loading directories in chunks by @&#8203;sxyazi in sxyazi/yazi#2366
* feat: make incompatible version message more clear by @&#8203;sxyazi in sxyazi/yazi#2377
* feat: bump `trash` and `libc` versions to support NetBSD by @&#8203;sxyazi in sxyazi/yazi#2388
* feat: new `rt` and `th` allow to access user configuration and theme scheme in sync/async plugins consistently by @&#8203;sxyazi in sxyazi/yazi#2389
* feat: new `tbl_col` and `tbl_cell` in theme system for spotter table styling by @&#8203;sxyazi in sxyazi/yazi#2391
* feat: add ripgrep-all support for search by @&#8203;paperbenni in sxyazi/yazi#2383
* feat: new `cf.args` to access startup arguments by @&#8203;sxyazi in sxyazi/yazi#2392
* refactor: rename `cf` to `rt` by @&#8203;sxyazi in sxyazi/yazi#2393
* feat: expose `mode` field in `Cha` by @&#8203;sxyazi in sxyazi/yazi#2394
* refactor: rename `rt.manager` to `rt.mgr`, and `th.manager` to `th.mgr` by @&#8203;sxyazi in sxyazi/yazi#2397
* feat!: allow to specify layer for keymap commands by @&#8203;sxyazi in sxyazi/yazi#2399

#### New Contributors
* @&#8203;PFiS1737 made their first contribution in sxyazi/yazi#2313
* @&#8203;paperbenni made their first contribution in sxyazi/yazi#2383

**Full Changelog**: sxyazi/yazi@v25.2.11...v25.2.26

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODEuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE4MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2025
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.

[Feature Request] Enhance status line configuration

2 participants