<commit_before>/*
 * XMonad status plugin, receiving workspace status over DBus.
 * To send status, use dbusLog or dbusLogWithMarkup from
 * System.Tianbar.XMonadLog as your XMonad logHook.
 *
 * The status appears in elements matching class 'widget-xmonad'.
 *
 * The plugin requires 'jquery' to be available through RequireJS.
 */
define(['jquery', './dbus'], function ($, dbus) {
  dbus.listen(
    {
      path: '/org/xmonad/Log',
      iface: 'org.xmonad.Log',
      member: 'Update'
    },
    function (signal, body) {
      var st = body[0];
      $('.widget-xmonad').html(st);
    }
  );
});<commit_msg>Status change callback for XMonad plugin<commit_after>/*
 * XMonad status plugin, receiving workspace status over DBus.
 * To send status, use dbusLog or dbusLogWithMarkup from
 * System.Tianbar.XMonadLog as your XMonad logHook.
 *
 * The status appears in elements matching class 'widget-xmonad'.
 *
 * The 'change' callback ($.Callbacks) object is fired whenever the
 * status changes.
 *
 * The plugin requires 'jquery' to be available through RequireJS.
 */
define(['jquery', './dbus'], function ($, dbus) {
  var change = $.Callbacks();

  dbus.listen(
    {
      path: '/org/xmonad/Log',
      iface: 'org.xmonad.Log',
      member: 'Update'
    },
    function (signal, body) {
      var st = body[0];
      $('.widget-xmonad').html(st);
      change.fire(st);
    }
  );

  return {
    change: change
  };
});
{'fraction_non_alphanumeric': 0.14116002795248078, 'fraction_numerical': 0.001397624039133473, 'mean_word_length': 3.011204481792717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2834541', 'n_tokens_mistral': 469, 'n_tokens_neox': 464, 'n_words': 137}