sxyazi / yazi

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

Changing icons doesn't work. #1283

Closed Jimmytalksalot closed 1 month ago

Jimmytalksalot commented 1 month ago

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

Kitty

yazi --debug output

```sh ##### ↓↓↓ Paste the output here: ↓↓↓ ##### Yazi Version: 0.2.5 (Homebrew 2024-06-22) Debug : false OS : linux-x86_64 (unix) Ya Version: 0.2.5 Emulator Emulator.via_env: ("xterm-kitty", "") Emulator.via_csi: Ok(Kitty) Emulator.detect : Kitty Adapter Adapter.matches: Kitty Desktop XDG_SESSION_TYPE: Some("x11") WAYLAND_DISPLAY : None DISPLAY : Some(":0") SSH shared.in_ssh_connection: false WSL /proc/sys/fs/binfmt_misc/WSLInterop: false Variables SHELL : Some("/bin/bash") EDITOR : None ZELLIJ_SESSION_NAME: None YAZI_FILE_ONE : None YAZI_CONFIG_HOME : 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 : No such file or directory (os error 2) ffmpegthumbnailer: 2.2.2 magick : 7.1.1-34 fzf : 0.53.0 fd : No such file or directory (os error 2) rg : No such file or directory (os error 2) chafa : 1.14.0 zoxide : 0.9.3 unar : 1.10.1 jq : 1.7 -------------------------------------------------- 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/fiz/.local/state/yazi" directory.

Did you try the latest nightly build to see if the problem got fixed?

No, and I'll explain why below

Describe the bug

I wanted to change my folder icons to something else, I copied some configurations when I figured out that the yazi wiki wouldn't work, and even used AI to solve the problem. I'm fairly new to Linux, so please don't be mean to me.

Also I have no idea what a nightly build is. And don't know how to install them.

Expected Behavior

The folder icons would be changed, when I typed this out.

[icon] rules= [ { name = "" , text = "" }, { name = "/", text = "󰝰", fg = "yellow" }, ]

To Reproduce

I got it with this.

[icon] rules= [ { name = "" , text = "" }, { name = "/", text = "󰝰", fg = "yellow" }, ]

Configuration

"$schema" = "https://yazi-rs.github.io/schemas/theme.json"

[manager] cwd = {fg = "#959FA9"} hovered = {fg = "#87929e" } preview_hovered = {fg = "#959FA9"} marker_selected = {fg = "#959FA9"} marker_copied = {fg = "#959FA9"} border_style = {fg = "#959FA9"} tab_active = {fg = "#959FA9"} tab_inactive = {fg = "#959FA9"} tab_width = 5 [select] inactive = {fg = "#58688c"} active = {fg = "#ffffff", bg = "#264662"} selected = {fg = "#ffffff"} value = {fg = "#ffffff"}

[input] title = {fg = "#ffffff"}

[completion] active = {fg = "#264662"} inactive = {fg = "#264662"} icon_folder = "🗀"

[tasks] title = {fg = "#ffffff"}

[status] mode_normal = {fg = "#1a1417"} mode_select = {fg = "#1a1417"}

[help] run = {fg = "#264662"} on = {fg = "#264662"} desc = {fg = "#264662"} hovered = {fg = "#264662"} footer = {fg = "#264662"}

Define the styles for different file types

[filetype] rules = [

Images

{ name = "image/*", fg = "#959FA9" },

# Videos
{ name = "video/*", fg =  "#959FA9"  },
{ name = "audio/*", fg =  "#959FA9"  },

# Empty files
{ name = "inode/x-empty", fg =  "#959FA9"  },

# Orphan symbolic links
{ name = "*", is = "orphan", fg = "#959FA9" },

# All files
{ name = "*", fg = "#959FA9" },

# All directories
{ name = "*/", fg = "#959FA9", text = "🗀"  }

]

[icon] rules= [ { name = "" , text = "" }, { name = "/", text = "󰝰", fg = "yellow" }, ]

Anything else?

No response

sxyazi commented 1 month ago

I noticed you're using the nightly version, so you should copy the latest theme.toml file here https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/theme.toml.

This is a breaking change in the upcoming Yazi v0.3, see https://github.com/sxyazi/yazi/pull/1086 for details.

Jimmytalksalot commented 1 month ago

now it says this Error: TOML parse error at line 264, column 1 | 264 | [[icon.conds]] | ^^^^^^^^^^^^^^ missing field cond

which happened after I added

conds = [

Special files

{ if = "orphan", text = "" },
{ if = "link"  , text = "" },
{ if = "block" , text = "" },
{ if = "char"  , text = "" },
{ if = "fifo"  , text = "" },
{ if = "sock"  , text = "" },
{ if = "sticky", text = "" },

# Fallback
{ if = "dir", text = "󰉋" },
{ if = "exec", text = "" },
{ if = "!dir", text = "󰈔" },

]

Jimmytalksalot commented 1 month ago

when I tried to make the icons work for all directories

sxyazi commented 1 month ago

Your nightly build was from 2024-06-22, and it's been a while since then. Please update it to the latest.

Jimmytalksalot commented 1 month ago

how do I do that?

Jimmytalksalot commented 1 month ago

I used brew to install it, so do I have to use a different version?

sxyazi commented 1 month ago

You used the --HEAD flag when installing Yazi with Homebrew, so you got the nightly version available at the time (2024-06-22). You need to upgrade it to the latest nightly version from today (2024-07-13).

So try

brew uninstall yazi
brew install yazi --HEAD
github-actions[bot] commented 3 weeks 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.