Creating a console / NCurses (X-free) interface to Audacious

Added by Jim Turner 11 days ago

I'm not asking this to be done, but am considering the possibility of creating one as a "fun project" exercize / contrabution. I'm looking for tips / suggestions on how to create an "interface plugin" (is that the correct term?) that would enable running Audacious WITHOUT X running. I'm thinking a/b starting with just a main "playlist window" that looks very similar to the GTK main window, then later possibly adding an equalizer popup paine, then a settings paine. Any suggestions / hints / tips?

Regards,

Jim


Replies (1)

RE: Creating a console / NCurses (X-free) interface to Audacious - Added by John Lindgren 11 days ago

It should be very doable and I think it could be a lot of fun, so have at it!

I would suggest starting with the skeleton of ui_gtk.cc (in audacious-plugins/src/gtkui) and ripping out all the GTK-specific stuff. The bare minimum you need to keep is an instance of the IfacePlugin class. In the PluginInfo struct, you don't need "& gtkui_prefs" or "PluginGLibOnly" so replace those with nullptr and 0. The init() function needs to return true. Replace gtk_main() with mainloop_run() (from libaudcore/mainloop.h) and gtk_main_quit() with mainloop_quit(). The rest of the IfacePlugin functions don't need to do anything at all yet.

If you can get that to compile, you should be able to install it as a new interface plugin and it should show up in the list under File -> Settings -> Appearance -> Interface. In theory you should then be able to switch to it, and it will look just like you're running in headless mode. (Emphasis on "in theory"!)

Let me know if you can get that much working for starters. If you run into snags along the way, I'm happy to help out as time allows.

(1-1/1)