Command line library for GUI

Lasnik

New Member
Joined
Oct 22, 2020
Messages
9
Reaction score
4
Credits
75
I installed Debian via the minimal-net installer without any GUI.
But now I want to make one myself :D
So are there any Java (this would be better) or C libaries that can help building a simple GUI in the command line?
 


So you want to build your own window manager, or desktop environment?

This isn’t a trivial undertaking.

There is always the QT library, which has bindings for C++ and python. KDE/plasma is based on QT. LXQT and RazorQT are two other lightweight QT based desktop environments. I think they recently merged with each other though.

GTK is used by the GNOME Desktop Environment and Mate and I think cinnamon too. GTK has C and C++ bindings.

Alternatively, there is dwm - a tiling window manager which is approximately 2000 lines of C code - which implements a minimalist, but complete window managerthat you can heavily modify if you like. There are a number of pre-made patches available that implement various new features. Or you can edit the source code yourself to make any other changes.

dwm has very few external dependencies. Can be built and installed from source in mere seconds.

There are a number of other similar tiling window managers, written in various languages like i3, awesome, xmonad.
Again, pre built packages are available, but they can easily be built and installed from source too- allowing you to make any modifications to them if you want to add (or remove) certain features!
 
Last edited:
Are you wanting a Xwindows GUI tool or an ASCII tui type menu?
(i.e. NetworkManager-nmtui)
 
The ASCII tui type menu I guess. I just want a really simple GUI and only have the command line version.
 
Last edited:
There is the ncurses library - that can be used to create GUI's in the terminal using C.
It should be in the repos of pretty much all distros. It's used by pretty much every TUI program that presents a GUI instead of pure plain text.

The original library and dev package is C based, but AFAIK as well as C - there are packages with bindings for Python that you can install via pip if they aren't in your distros repos. And I'm sure somebody somewhere has probably implemented bindings for it in java too. But you'd have to look that up! Github might be a good place to look.
Looking in the Debian repos - there are also bindings for Haskell, Lua, Ruby and even Yorick!
 
Thinking about it - I think the python curses module might actually be part of its standard library.
There are some other curses style libraries for python too - urwid, npyscreen, and curtsies immediately spring to mind. They should be available in pip, if they aren't in your distros repos.
 
That was exactly what I was looking for. Thank you!
I think I'll just use python. It would be a good excuse using and learning python.
 

Members online


Latest posts

Top