cTune v1.2 released

cTune C99 Project Releases

For this release there has been a lot of work done in the UI side as well as the usual bug squashing. Mouse support, Themes and unicode icons are added and are all available from the Configuration menu.

Version 1.2

1. UI

1.1 Themes

The theme engine now has internal presets as well as a "Custom" preset that can be selected from the Configuration menu. The "Custom" preset uses the values set inside the configuration file so, if the baked in themes are not your cup of tea, you can still make your own like in the previous versions but also select it via the Configuration menu.

Default theme
Fig.1 Default theme
Hackerman theme
Fig.2 "Hackerman" theme
Red-zone theme
Fig.3 "Red-zone" theme
Deep-blue theme
Fig.4 "Deep-blue" theme

When using internal presets, there is an ability to still use the "Custom" preset's colours for Favourite stations by using the "Toggle theming *" menu item. The relevant lines in the configuration files for that are:

UI::Theme::row::favourite::local={COLOUR} UI::Theme::row::favourite::remote={COLOUR}

1.2 Unicode icons

Unicode is now pretty ubiquitous in the terminal so why not use its fancy characters for icons? Assuming the terminal font supports these, cTune can now have those pretty single character icons replacing the old ASCII symbols. For the purists; fear not as there is a way to toggle between the two available in the Configuration menu.

Unicode icons
Fig.5 Unicode icons
ASCII icons
Fig.6 ASCII icons

1.3 Mouse support

That functionality was a long time coming! Mouse click detection for all the different widgets is now implemented as well as mouse event handlers for the dialogs using said widgets. Everything is navigable with the mouse alone including volume control, play/stop, etc...

The scrolling and window controls are only displayed when the mouse support is turned on.

There is also a guide available in the repository's documentation detailing mouse controls.

Mouse on
Fig.7 Dialog with mouse support ON
Mouse off
Fig.8 Dialog with mouse support OFF

2. Code

2.1 Stream timeout

Stream timeout menu item
Fig.9 Stream timeout menu item

The stream timout field (in seconds) from the configuration file can now be safely modified from the Options menu. The default value is currently '5s' but, for some streams with rather chungus frames to decode, increasing it to 6-8s might yield better results.

2.2 Form widget

When implementing mouse support it became very clear that a new widget was needed to not only combine the already large chunk of code shared between RSEdit and RSFind but to wrap the ncurses form library call neatly along with the mouse logic in one package.

The upside now is that new "form" based dialogs can be implemented with all the basic mouse-related stuff like scrolling and field getters based on coordinates baked in. All there is to do is code-in the field initialisation callback and the mouse handling event method in a "form" based Dialog. This should make life a lot easier down the line.

Widget UML
Fig.10 New 'Form' widget

2.3 Bugs

The RadioBrowserAPI searches are now properly working. The following were corrected:

  • "Exact match" broken for "Country", "Language" and single "Tag" (unused).
  • State: was broken when "Exact match" was selected for it.

Aside from that, a fair amount of minor bugs have been squashed out of existence.

3. Docker

The previous "Arch" docker file was optimised a little and a new "Ubuntu" options was added since the last major release.

The docker-compose.sh script takes an argument (arch, ubuntu) to build and launch a container with the preferred base image.

As previously stated in the v1.1 release, the containerisation is for Linux only as it requires pulseaudio to work.

4. Showcase video

I made a little video to showcase cTune a little...

5. Final words

As always, the update is available in Arch's AUR. Otherwise, it's a manual build/install.

Rock on!

Github Repository