i3bar: Don't start child unless status_command

If a command is passed to `start_child` which is NULL, such as in the
case when there is no `status_command` specified in the bar config, do
not start a child process to listen on stdin.

fixes #1140
This commit is contained in:
Tony Crisci
2013-12-26 22:00:06 -05:00
committed by Michael Stapelberg
parent 38b6936c25
commit ac74a63662
3 changed files with 34 additions and 37 deletions

View File

@ -100,9 +100,6 @@ void got_bar_config(char *reply) {
/* Resolve color strings to colorpixels and save them, then free the strings. */
init_colors(&(config.colors));
/* The name of this function is actually misleading. Even if no command is
* specified, this function initiates the watchers to listen on stdin and
* react accordingly */
start_child(config.command);
FREE(config.command);
}