Skip to content

Show user/group of files in status bar doesnt work #473

Closed Locked Answered by sxyazi
og900aero asked this question in 1. Q&A
Discussion options

You must be logged in to vote

Hi, this is a new feature added yesterday. You'll need to use the latest main branch to make it work. Also, you don't need to copy the entire file, just:

-- ~/.config/yazi/init.lua

function Status:owner()
	local h = cx.active.current.hovered
	if h == nil or ya.target_family() ~= "unix" then
		return ui.Line {}
	end

	return ui.Line {
		ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
		ui.Span(":"),
		ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
		ui.Span(" "),
	}
end

function Status:render(area)
	self.area = area

	local left = ui.Line { self:mode(), self:size(), self:name() }
	local right = ui.Line { self:owner(), self:permissions(), self:

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@og900aero
Comment options

@sxyazi
Comment options

@og900aero
Comment options

@sxyazi
Comment options

@og900aero
Comment options

Answer selected by og900aero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
1. Q&A
Labels
None yet
2 participants