feat: yazi configuration
This commit is contained in:
@@ -84,7 +84,45 @@
|
||||
# Yazi (File manager)
|
||||
programs.yazi.enable = true;
|
||||
programs.yazi.enableZshIntegration = true;
|
||||
programs.yazi.settings = {
|
||||
manager = {
|
||||
show_hidden = true;
|
||||
show_symlink = true;
|
||||
|
||||
sort_by = "natural";
|
||||
sort_dir_first = true;
|
||||
sort_sensitive = false;
|
||||
sort_translit = true;
|
||||
|
||||
linemode = "size";
|
||||
};
|
||||
};
|
||||
home.file."${config.xdg.configHome}/yazi/init.lua".text = ''
|
||||
-- Add username and hostname in header
|
||||
-- https://yazi-rs.github.io/docs/tips#username-hostname-in-header
|
||||
Header:children_add(function()
|
||||
if ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
return ui.Span(ya.user_name() .. "@" .. ya.host_name() .. ":"):fg("blue")
|
||||
end, 500, Header.LEFT)
|
||||
|
||||
-- Add user and group owner of file in status line
|
||||
-- https://yazi-rs.github.io/docs/tips#user-group-in-status
|
||||
Status:children_add(function()
|
||||
local h = cx.active.current.hovered
|
||||
if h == nil or ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
|
||||
return ui.Line({
|
||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||
":",
|
||||
ui.Span(ya.user_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||
" ",
|
||||
})
|
||||
end, 500, Status.RIGHT)
|
||||
'';
|
||||
# Zellij (Terminal multiplexer)
|
||||
programs.zellij.enable = true;
|
||||
programs.zellij.enableZshIntegration = true;
|
||||
|
||||
Reference in New Issue
Block a user