Skip to content

Draft: Configurable middle click action to cycle between outputs

I opened #77 when I found myself changing outputs multiple times per day between my speakers and my headphones, while never using the middle click mute functionality.

This MR implements a new xfconf property middle-click-action with a default of the current behavior where middle clicking the panel icon mutes or unmutes the volume, and a new second option to select the next output in the list after the currently selected output.

Currently the xfconf property does not work. It is not created according to xfconf-query, and when the UI attempts to set it an error is produced:

(wrapper-2.0:492812): xfconf-CRITICAL **: 01:11:14.622: IA__xfconf_channel_set_property: assertion 'XFCONF_IS_CHANNEL(channel) && property && G_IS_VALUE(value)' failed

This is my first time contributing to any part of Xfce, or interacting with the codebase at all. Here are other areas of the MR where I expect there is a better solution and I would welcome feedback:

  • The transform functions for the GBinding between multiple radio buttons and a single enum property are built in a brute force fashion. I know they should be improved to handle more than 2 cases, and I suspect there's a much better way to implement them at all.
  • The interface could be a different widget than mutliple radio buttons. Perhaps a radio menu, or some other "select one of many" element.

Merge request reports