Skip to content

[Feature Request] Display disk/volume free space in status bar #2493

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

Open
2 of 3 tasks
CHANTXU64 opened this issue Mar 18, 2025 · 5 comments
Open
2 of 3 tasks

[Feature Request] Display disk/volume free space in status bar #2493

CHANTXU64 opened this issue Mar 18, 2025 · 5 comments
Labels
feature New feature request

Comments

@CHANTXU64
Copy link

CHANTXU64 commented Mar 18, 2025

yazi --debug output

Yazi
    Version: 25.4.8 (99ea3b74 2025-04-09)
    Debug  : false
    Triple : aarch64-apple-darwin (macos-aarch64)
    Rustc  : 1.86.0 (05f9846f 2025-03-31)

Ya
    Version: 25.4.8 (Homebrew 2025-04-08)

Emulator
    TERM                : Some("xterm-256color")
    TERM_PROGRAM        : Some("iTerm.app")
    TERM_PROGRAM_VERSION: Some("3.5.11")
    Brand.from_env      : Some(Iterm2)
    Emulator.detect     : Emulator { kind: Left(Iterm2), light: true, cell_size: None }

Adapter
    Adapter.matches    : Iip
    Dimension.available: WindowSize { rows: 52, columns: 213, width: 3834, height: 1976 }

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : Some("/private/tmp/com.apple.launchd.zMggB4xPI9/org.xquartz:0")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL           : Some("/bin/zsh")
    EDITOR          : Some("nvim")
    VISUAL          : None
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: None

Text Opener
    default     : Some(OpenerRule { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-create: Some(OpenerRule { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-rename: Some(OpenerRule { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : tmux 3.5a
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file          : 5.41
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 7.1.1 / 7.1.1
    pdftoppm      : No such file or directory (os error 2)
    magick        : 7.1.1-47
    fzf           : 0.61.1
    fd/fdfind     : 10.2.0 / No such file or directory (os error 2)
    rg            : 14.1.1
    chafa         : No such file or directory (os error 2)
    zoxide        : No such file or directory (os error 2)
    7zz/7z        : No such file or directory (os error 2) / 17.05
    jq            : 1.6

Clipboard
    wl-copy/paste: No such file or directory (os error 2) / No such file or directory (os error 2)
    xclip        : No such file or directory (os error 2)
    xsel         : No such file or directory (os error 2)

Routine
    `file -bL --mime-type`: text/plain


See https://yazi-rs.github.io/docs/plugins/overview#debugging on how to enable logging or debug runtime errors.

Please describe the problem you're trying to solve

Hi, I would like to request a feature to display the current disk or volume's free space in Yazi's status bar. Like Ranger.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

/

Additional context

No response

Checklist

  • I have searched the existing issues/discussions
  • The latest nightly build doesn't already have this feature
@CHANTXU64 CHANTXU64 added the feature New feature request label Mar 18, 2025
Copy link

Hey @CHANTXU64, I noticed that you did not correctly follow the issue template. Please ensure that:

  • The requested feature does not exist in the newest nightly build.
  • The debug information (yazi --debug) is updated for the newest nightly.
  • The non-optional items in the checklist are checked.

Issues with needs info will be marked ready once edited with the proper content, or closed after 2 days of inactivity.

@PoisonFrog
Copy link

I do miss this feature. It is widely available in other file managers and I wish Yazi also had that.

@MephresGH
Copy link

Such a feature would be great to have, even if it's just an optional one. This would make Yazi a very cozy alternative to Ranger for sure.

@ykelvis
Copy link

ykelvis commented May 13, 2025

i figured out this can be done with some code in init.lua, just like Show user/group of files in status bar.
this is what i use:

-- show disk in status bar
Status:children_add(function()
    local command = "df -kh .|awk '!/^Filesystem/{printf \" %s FREE \", $(NF-2)}'"
    local info = ui.Span(io.popen(command):read('*a')):fg("green")
    return info
end, 1500, Header.RIGHT)

macos's coreutils is diffrent from gnu's so you might need to install the gnu version or adjust that command line.

@MephresGH
Copy link

Huh, I didn't know you could do that. Very nice, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

5 participants