8 ms·
Ask HN: Simple GUI for Bash Scripts
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
- sargstuff 2y agoWell, 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/ https://pypi.org/project/ascii-animator/ [6] : https://medium.com/@SrvZ/how-to-create-stunning-graphs-in-the-terminal-with-python-2adf9d012131 https://medium.com/@SrvZ/how-to-create-stunning-graphs-in-th... [5] : https://python.plainenglish.io/modern-python-guis-with-pyqt-cross-platform-desktop-apps-made-easy-101e85a51532 https://python.plainenglish.io/modern-python-guis-with-pyqt-... [4] : https://medium.com/@SrvZ/how-to-create-stunning-graphs-in-the-terminal-with-python-2adf9d012131 https://medium.com/@SrvZ/how-to-create-stunning-graphs-in-th... [3] cliffi : https://github.com/ysaxon/cliffi https://github.com/ysaxon/cliffi [2] pygame : https://www.pygame.org/wiki/about https://www.pygame.org/wiki/about [1] lvgl : https://blog.lvgl.io/2018-01-03/linux_fb https://blog.lvgl.io/2018-01-03/linux_fb [0] tui : https://en.wikipedia.org/wiki/Text-based_user_interface https://en.wikipedia.org/wiki/Text-based_user_interface
- tgol 2y agothank you very much. using the python gtk bindings seems to be what I'm searching for.
- jimbobthrowawy 2y agoIf 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.
- tgol 2y agothx