sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
14.54k stars 331 forks source link

Use the reversed style in preview_hovered by default #1413

Closed TobisLee closed 1 month ago

TobisLee commented 1 month ago

yazi --debug output

```sh ##### ↓↓↓ Paste the output here: ↓↓↓ ##### Yazi Version: 0.3.0 (d2ebadb6 2024-08-03) Debug : false OS : linux-x86_64 (unix) Ya Version: 0.3.0 Emulator Emulator.via_env: ("xterm-kitty", "") Emulator.via_csi: Ok(Kitty) Emulator.detect : Kitty Adapter Adapter.matches: Kitty Desktop XDG_SESSION_TYPE: Some("wayland") WAYLAND_DISPLAY : Some("wayland-0") DISPLAY : Some(":0") SSH shared.in_ssh_connection: false WSL /proc/sys/fs/binfmt_misc/WSLInterop: false Variables SHELL : Some("/usr/bin/fish") EDITOR : Some("nvim") YAZI_FILE_ONE : None YAZI_CONFIG_HOME : None ZELLIJ_SESSION_NAME: None Text Opener default: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true }) block : Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true }) tmux TMUX : false Version: 3.4 Dependencies file : 5.45 ueberzugpp : 2.9.6 ffmpegthumbnailer: 2.2.2 magick : 7.1.1-36 fzf : 0.54.3 fd : 10.1.0 rg : 14.1.0 chafa : 1.14.1 zoxide : 0.9.4 7z : 17.05 7zz : No such file or directory (os error 2) jq : 1.7.1 -------------------------------------------------- When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time. You can find it in the "/home/tlss/.local/state/yazi" directory. ```

Please describe the problem you're trying to solve

Yazi now use the underline style in preview_hovered as default. Should we consider to change to the reversed style?

Here are some reasons:

  1. Some filenames might contain _, and underline style will be confused with it.
  2. The style of parent hovered and current hovered both are reversed style, the underline style seems not consistent with them.

Would you be willing to contribute this feature?

Describe the solution you'd like

Change the preview_hovered to reversed style as default.

Additional context

No response

Validations

sxyazi commented 1 month ago

This is intentional; I wanted to add an underline instead of a background color to indicate it's a "temporary view" during preview.

Feel free to change its style to your liking easily:

# ~/.config/yazi/theme.toml
[manager]
preview_hovered = { fg = "black", bg = "lightblue" }

Just add the above to your configuration file. See the docs here: https://yazi-rs.github.io/docs/configuration/theme#manager

sxyazi commented 1 month ago

Some filenames might contain _, and underline style will be confused with it.

It looks like this on my end, and seems to have a certain distinctiveness from _:

screenshot-001939

TobisLee commented 1 month ago

Thanks for your reply. I notice that I have a different font. I will change the theme configuration myself.

screenshot_20240805_120423

github-actions[bot] commented 1 week ago

I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.