Replace calls to xmessage to batt-low.sh so that message is only shown once. We only patch main.c and not main.vala so makefile doesn't trigger vala -> C compilation. diff -ur vattery-0.7.5/src/main.c vattery-0.7.5-new/src/main.c --- vattery-0.7.5/src/main.c 2012-06-17 22:25:05.000000000 +0700 +++ vattery-0.7.5-new/src/main.c 2015-12-26 01:42:03.730550571 +0700 @@ -383,12 +383,12 @@ _tmp11_ = g_strdup ("5"); _g_free0 (self->priv->percent_critical); self->priv->percent_critical = _tmp11_; - _tmp12_ = _ ("battery is very low"); - _tmp13_ = g_strconcat ("xmessage ", _tmp12_, NULL); + _tmp12_ = _ ("low"); + _tmp13_ = g_strconcat ("batt-low.sh ", _tmp12_, NULL); _g_free0 (self->priv->command_warning); self->priv->command_warning = _tmp13_; - _tmp14_ = _ ("battery is critically low"); - _tmp15_ = g_strconcat ("xmessage ", _tmp14_, NULL); + _tmp14_ = _ ("critical"); + _tmp15_ = g_strconcat ("batt-low.sh ", _tmp14_, NULL); _g_free0 (self->priv->command_critical); self->priv->command_critical = _tmp15_; _tmp16_ = g_get_user_config_dir ();