Comment 5 for bug 1375054

Revision history for this message
Eric Young (youe) wrote :

I had been hoping for this feature for a long time. A strong indicator of broadcast mode is so nice to have. So I decided to figure out how to implement it myself and wrote a plugin yesterday.

When broadcast is enabled, the plugin will temporarily update the bgcolor of every terminal to your configured color. When broadcast is disabled, it will revert the bgcolor back to the previous color before it was changed. This color change is temporary because it is isn't persisted in the config.

The default color is a dark red (#400000) but this is configurable.

###### plugin config example ######
[plugins]
  [[BroadcastBG]]
    bgcolor = "#200020"
######

This isn't a standard plugin. To avoid adding multiple complex GTK window event or signal callbacks, I created a new plugin "capability" which I just named "broadcast_change". This callback triggers whenever broadcast mode is enabled or disabled. In order to add the new "capability", the plugin injects a new "set_groupsend()" method into the Terminal class. The new method has the same exact code as the class method (v0.98) but additionally calls the plugin callbacks matching "broadcast_change" capability.

I wrote the plugin against Terminator v0.98 and already confirmed it doesn't work against 1.x releases that use GTK3. The GTK bindings in the plugin are currently necessary in order to parse the color string. There is probably a better way to do this with the GTK dependency.

The only known issue with the plugin is that it will not update the bgcolor of new terminals (new tabs/windows). But if you enable/disable broadcast mode after creating the new terminal it will update it as expected.