From 811e75da52a0b504db4221df4504d3594ba3cb8b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 4 Jun 2008 05:40:35 +0000 Subject: Status bar left and right strings (set with status-left and status-right), and automatic update (at interval set by status-interval). --- cmd-set-option.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'cmd-set-option.c') diff --git a/cmd-set-option.c b/cmd-set-option.c index 3a47583f..49aac0d7 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -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 @@ -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; -- cgit