20 lines
465 B
Nix
20 lines
465 B
Nix
{ ... }:
|
|
{
|
|
programs.yazi = {
|
|
enable = true;
|
|
settings.mgr.sort_dir_first=false;
|
|
};
|
|
|
|
home.sessionVariables.BROWSER = "yazi";
|
|
programs.yazi.shellWrapperName = "y";
|
|
# programs.bash.bashrcExtra = ''
|
|
# function y() {
|
|
# local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
|
# yazi "$@" --cwd-file="$tmp"
|
|
# IFS= read -r -d "" cwd < "$tmp"
|
|
# [ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd"
|
|
# rm -f -- "$tmp"
|
|
# }
|
|
# '';
|
|
}
|