ezkur / yad

Automatically exported from code.google.com/p/yad
GNU General Public License v3.0
0 stars 0 forks source link

yad progress pulsate #54

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
yad 0.10.2 on archlinux
"lxsplit -j file.avi.001|yad --progress --pulsate --auto-close --auto-kill 
--button gtk-cancel:1"
I'm using lxsplit to join a number of files and I want yad to display a 
pulsating progress bar while the command is running.  When I execute the above 
command yad doesn't show a pulsating progress bar...I think because lxsplit 
doesn't generate any output to stdin.  I think reading stdin is important for 
progress bar but not for pulsating option.  So can you make progress bar 
pulsate until the command feed into it finishes?  Thanks.

Original issue reported on code.google.com by tri...@gmail.com on 17 Apr 2011 at 2:02

GoogleCodeExporter commented 8 years ago
you are wrong, reading stdin is always important. progress bar indicates that 
process is running or not. and only way to check this is a read data from 
stdin. no data - no progress

but in your case you may try to use some third-party tools for generating 
output for your process. for example - pv 
(http://www.ivarch.com/programs/pv.shtml)

Original comment by ananasik on 17 Apr 2011 at 5:19

GoogleCodeExporter commented 8 years ago
Can you check if a process is running by its pid?  Thanks for the pv 
recommendation.

Original comment by tri...@gmail.com on 17 Apr 2011 at 5:34

GoogleCodeExporter commented 8 years ago
check running process is a task for glue script, not for yad.

like follow

lxsplit -j file.avi.001 &
while pkill -0 lxsplit; do 
  echo running
  sleep 0.5
done | yad --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1

Original comment by ananasik on 17 Apr 2011 at 5:41

GoogleCodeExporter commented 8 years ago
I am really liking yad, it is much more powerful than zenity.  However I am 
having trouble getting the log function to work.  Try this example and maybe 
someone can help me understand what I am doing wrong

lxsplit -j file.avi.001 &
while pkill -0 lxsplit; do 
  echo running
  sleep 0.5
done | yad --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1 
--enable-log --log-expanded

Thanks

Original comment by coopercr...@gmail.com on 5 Dec 2013 at 3:19

GoogleCodeExporter commented 8 years ago
only stings, started with '#' appends to log

lxsplit -j file.avi.001 &
while pkill -0 lxsplit; do 
  echo '#running'
  sleep 0.5
done | yad --progress --pulsate --auto-close --auto-kill --button gtk-cancel:1 
--enable-log --log-expanded

Original comment by ananasik on 5 Dec 2013 at 5:24

GoogleCodeExporter commented 8 years ago
Thanks for the reply.

Is there any way to tail -f a log file for example to the yad progress log?

Original comment by coopercr...@gmail.com on 10 Dec 2013 at 2:00

GoogleCodeExporter commented 8 years ago
One more thing, it seems the log command only works from an interactive shell, 
not when run from a shell script.

Original comment by coopercr...@gmail.com on 10 Dec 2013 at 2:43

GoogleCodeExporter commented 8 years ago
try to disable buffering with stdbuf command in your script

Original comment by ananasik on 10 Dec 2013 at 5:53