dust is awesome, but not dynamic like a file manager. One can take advantage of both if:
- one terminal window shows the dust tree
- the other window runs a file manager, that sorts by size is ideal like ncdu
Next is my proposal, though it just works using kitty and zsh.
Request:

#!/usr/bin/env zsh
_du() {
dust -r
unset answer_du && echo -n "Navigate dirs with ncdu? (y/N): "
read answer_du
answer_du=${answer_du:-n} # Default to 'n' if no input is provided
echo
if [[ "$answer_du" == "n" ]]; then
return
fi
_kitty_vwindow_new "dust -r" "_du_ncdu"
}
_du_ncdu() {
sleep 1
# flags: https://dev.yorhel.nl/ncdu/man
ncdu --color dark-bg --show-percent --show-itemcount --follow-symlinks --confirm-delete
}
_kitty_vwindow_new() {
if [ $# -lt 1 ]; then
echo "Error: Missing arguments"
echo "Usage: x_kitty_vwindow_new <right_cmd> <left_cmd>"
return 1
fi
local right_cmd="$1"
local left_cmd="$2"
# Create new window
kitty @ launch\
--type=window \
--keep-focus \
--hold zsh -c "source ~/.zshrc && cd $PWD && $right_cmd; exec zsh"
# Run left command if any
if [ -n "$left_cmd" ]; then
$left_cmd
fi
}
dust is awesome, but not dynamic like a file manager. One can take advantage of both if:
Next is my proposal, though it just works using kitty and
zsh.Request: