Commits (3)
......@@ -160,14 +160,15 @@ main (int argc, char *argv[0])
return 1;
}
if (!name)
name = g_strdup (DEFAULT_EVENT);
g_timeout_add_seconds (watch, (GSourceFunc)on_watch_expired, NULL);
if (profile && !name)
success = set_profile (profile);
else
else {
if (!name)
name = g_strdup (DEFAULT_EVENT);
g_timeout_add_seconds (watch, (GSourceFunc)on_watch_expired, NULL);
success = trigger_event (name, profile, timeout);
}
lfb_uninit ();
return !success;
......
......@@ -66,7 +66,7 @@ print help and exit
</varlistentry>
<varlistentry>
<term><option>-p=<replaceable>PROFILE</replaceable></option></term>
<term><option>-P=<replaceable>PROFILE</replaceable></option></term>
<term><option>--profile=<replaceable>PROFILE</replaceable></option></term>
<para>
The feedback profile (<literal>full</literal>, <literal>quiet</literal>, <literal>silent</literal>)
......
......@@ -8,4 +8,4 @@ from gi.repository import Lfb
Lfb.init('org.sigxcpu.lfbexample')
event = Lfb.Event.new('phone-incoming-call')
event.trigger()
event.trigger_feedback()