I do a lot of bash scripts for various needs. Recently I started to feel the urge of implement various indicators on top of them.
Would be cool during an automated unattended installation script know which operation is being carried.
Also.. could be nice have a status bar displaying a percentage of the actual progress.
There are in Linux (preferibly Debian) some libs and commands like my mockup ones for manipulate the terminal output ?
(following commands are fake mockups ones just for make reader understand)
txtoverlay -k head -c azure "MyString on top of all the commands"
or
txtovelay -k tail -c green -a right "[ Completition: 57 % ]"
or
txtovelay -k canvas -c azure -b darkblue -l 2 -t 5 -w 68 -h 50
To generate something like the following graphical mockups?
Or even some more complex overlays..
Basically the concept could be the same in HTML with some DIVs over the main webpage with position: fixed
<div id="MyDiv1" style="position:fixed; color: #00ffff; top: 0px; left: 0px; padding: 10px"></div>
<div id="MyDiv2" style="position:fixed; color: #00ff00; bottom: 0px; right: 0px; padding: 10px; text-align: right"></div>
and time by time during the script various commands like:
document.getElementById("MyDiv1").innerHTML = "Step 5: Installing NET-TOOLS package in progress..<br>-------------------------"
document.getElementById("MyDiv2").innerHTML = "[Completition: 57 % ]"
screen
ortmux
does seem to be the way to go herescreen
(withhardstatus firstline
) and use its status line. You can change the status line from the running script withscreen -X hardstatus string "foo bar"