Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Simple GUI for Bash Scripts
3 points by tgol 3 months ago | hide | past | favorite | 4 comments
as you might've already seen, Chris Titus Tech is working on a Linux utility similar to winutil and in the first stream he struggled to find a replacement for the builtin windows gui that can be accessed through powershell. Now my question is what is the simplest library that could get this done on linux?

PS. it can't be a tui




If you strictly want to use bash, zenity and kdialog exist. I don't think you can create complex layouts with them, but calling either to get a dialog window is incredibly easy.


thx


Well, tui[0] kinda split between two things. -- a) draw full text page & display (aka just echo & with appropriate padding to fill out line b) text/text graphic character placement using control character sequences such as ansi escape sequences. The whole idea for tui is not to have to worry about graphics driver setups/invalid shell string characters. Not sure if plotex's text dithering method to display 'rick rolling in terminal' counts as tui (vs. ascii-animator method).[6][7]

linux framebuffer would be simplest -- one example library[1]. Pygame has many different backends that do non-tui (opengl, directx, windib, X11, linux frame buffer )[1]

Since shell is "string oriented", one would need to use a program such as cliffi[3] to make full use of lvgl and/or an associated shell plugin which provides lvgl shell extensions.

Python/gtk/pyqt[5]etc with usable gui at command line would be bit 'easier' than trying to graft bash with graphics at command line.

[7] : https://pypi.org/project/ascii-animator/

[6] : https://medium.com/@SrvZ/how-to-create-stunning-graphs-in-th...

[5] : https://python.plainenglish.io/modern-python-guis-with-pyqt-...

[4] : https://medium.com/@SrvZ/how-to-create-stunning-graphs-in-th...

[3] cliffi : https://github.com/ysaxon/cliffi

[2] pygame : https://www.pygame.org/wiki/about

[1] lvgl : https://blog.lvgl.io/2018-01-03/linux_fb

[0] tui : https://en.wikipedia.org/wiki/Text-based_user_interface


thank you very much. using the python gtk bindings seems to be what I'm searching for.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: