Zren / plasma-applet-commandoutput

https://store.kde.org/p/1166510/
GNU General Public License v2.0
87 stars 18 forks source link

Replace the line without having the information being printed one next to the other #37

Closed rizzini closed 1 year ago

rizzini commented 1 year ago

Is it possible to replace the last output with, for example:

for i in {10..1}; do printf "Counting down: $i\r" && sleep 1; done
Zren commented 1 year ago

More Discussion: https://old.reddit.com/r/kde/comments/yaofwl/is_there_any_other_widget_that_prints_the_output/

Since the widget is basically:

output=`for i in {10..1}; do printf "Counting down: $i\r" && sleep 1; done`
echo "$output"

It's not really possible to do this. That command would take 10 seconds to run, then print "Counting down: 1" even if I made \r delete the previous line in the output if it's not \r\n.

rizzini commented 1 year ago

Thanks, man.