Status bar left and right strings (set with status-left and status-right), and automatic update (at interval set by status-interval).

This commit is contained in:
Nicholas Marriott
2008-06-04 05:40:35 +00:00
parent 9e6090a7a2
commit 811e75da52
6 changed files with 71 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-set-option.c,v 1.19 2008-06-03 21:42:37 nicm Exp $ */
/* $Id: cmd-set-option.c,v 1.20 2008-06-04 05:40:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -242,6 +242,18 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx)
return;
}
options_set_number(oo, "history-limit", number);
} else if (strcmp(data->option, "status-left") == 0) {
if (data->value == NULL) {
ctx->error(ctx, "invalid value");
return;
}
options_set_string(oo, "status-left", "%s", data->value);
} else if (strcmp(data->option, "status-right") == 0) {
if (data->value == NULL) {
ctx->error(ctx, "invalid value");
return;
}
options_set_string(oo, "status-right", "%s", data->value);
} else {
ctx->error(ctx, "unknown option: %s", data->option);
return;