Pretty shell script (menus, images, antialias, 1080p, colors, fade effects, etc.)?

I've created a couple of very simple bash scripts for home arcade games (setting up input, updating files, etc.). I have a launcher so no need to direct the user to launch the required shell script, but when running the bash script, function-wise gives me all I need, the default low-res text - the black-black look scares the end user.

What's the easiest way to "prefix" fullscreen shell scripts? Something that will run the script at 1080p, use larger bubble anti-aliased fonts, add a fantastic animated background, etc., but still pretty much lets me write good old shell scripts?

I guess another way to ask is, is there a prettier, more modern GUI-like alternative to whiptail?

I am running from the terminal, so the GUI library should be as complete as possible.

+3


source to share


2 answers


The ability of a shell script to display output in the terminal window itself is limited solely by the graphical capabilities of the terminal (and to what termcap / terminfo supports).

Most terminals max out at 256 colors (although supposedly konsole

has support for any RGB colors somehow).

Controlling the font size / etc. from the shell is limited to escape sequences that the terminal is ready to respond to (and I don't know if they are standard or detectable at runtime).



The best option for this might be to have your script re-exec itself in a new terminal window, to which it will pass the appropriate arguments to control font selection, window geometry, color selection, etc.

Even saying that it's really not easy, it's not the easiest thing in the world (I'm not sure how portable command line parameters are between different terminal emulators or their number of more advanced features).

+1


source


You can use python with a library Gooey

that makes it easy to convert CLI applications to GUIs:

Gooey



It can be customized and only one line is required for the magic:

from gooey import Gooey

@Gooey      <--- all it takes! :)
def main():
  # rest of code

      

+1


source







All Articles