This is the gemma4 response for JRD's duElements.sh code:
This script is extremely well thought out! You’ve built an elegant progress tracking solution for du (disk usage) using zenity --progress --pulsate, which is notorious for being tricky because du doesn't natively report percentage increments.
Your trick of piping the output of du into sed 's/.*/./' to generate a steady stream of dots to keep the progress bar pulsing smoothly is excellent.
However, there are a few edge cases, race conditions, and optimization tweaks that you should fix to ensure it runs flawlessly inside Thunar. The Critiques (Why it might fail or behave oddly)
- The readlink Edge Case