Watcher - Zenity Progress Window

Zenity Progress Window
Download

Watcher - Zenity Progress Window Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Marc Brumlik

Watcher - Zenity Progress Window Tags


Watcher - Zenity Progress Window Description

Zenity Progress Window Have you wished for a way the zenity progress window could actually show "progress"? Here is one way to accomplish that.This explanation is far longer than the actual program. If you're good with scripts, just download it read the brief comments there.This is actually a fragment of my other submission, "avconvert" (you should go check that out). It's been made more generic to be useful as a stand-alone.Watcher -- Zenity Progress Window is not really a Nautilus script, just a shell script you can use elsewhere.The situation is that Zenity's progress can show one of two things - either a back-and-forth indicator as it receives any input, or a 0-100 percent-complete if it is given a number between 0 and 100. The challenge is handing it such a number from the output of an arbitrary program.The idea here is to separate the zenity process from the program producing an output file, so that the file can be watched without regard for what's doing the writing or what it's standard output is.The method is to start the watcher in the background, handing it parameters for the file to be watched and its anticipated size. The watcher then starts zenity. First, it waits up to 20 seconds for the specified target file to appear and have non-zero size. Then it displays a percent-complete window as the file size grows to approach the size estimate from the command line.Further, a common complaint about zenity is that hitting cancel often does not kill the task piped to it. Here, with the watcher being a separate detached process, that would be even harder. However, by handing it the parent process id of whatever task it's watching, it will kill that process for you.The download includes two files, "watcher" and "watcher-demo". The demo is a little test script that uses watcher to monitor the creation of a 10 meg file in /tmp.In playing with the demo, you'll see how Cancel kills the current program without killing the parent. This allows your program to take whatever action is appropriate when the user cancels an operation. Requirements: · Nautilus · zenity


Watcher - Zenity Progress Window Related Software