From: Michael Stapelberg Date: Wed, 13 Jul 2011 16:36:21 +0000 (+0200) Subject: i3-nagbar: implement -m, set default prompt to "Pleaso do not run this program" X-Git-Tag: tree-pr4~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=32af9d41064466b4346e29d19705be4641d5473d;p=i3%2Fi3 i3-nagbar: implement -m, set default prompt to "Pleaso do not run this program" It gets run by i3 automatically. --- diff --git a/i3-nagbar/main.c b/i3-nagbar/main.c index 73d6f63b..757a6cac 100644 --- a/i3-nagbar/main.c +++ b/i3-nagbar/main.c @@ -44,7 +44,7 @@ static xcb_rectangle_t rect = { 0, 0, 600, 20 }; static char *glyphs_ucs[512]; static int input_position; static int font_height; -static char *prompt = "You have an error in your i3 config file!"; +static char *prompt = "Please do not run this program."; static button_t *buttons; static int buttoncnt; xcb_window_t root; @@ -224,10 +224,11 @@ int main(int argc, char *argv[]) { {"font", required_argument, 0, 'f'}, {"button", required_argument, 0, 'b'}, {"help", no_argument, 0, 'h'}, + {"message", no_argument, 0, 'm'}, {0, 0, 0, 0} }; - char *options_string = "b:f:vh"; + char *options_string = "b:f:m:vh"; while ((o = getopt_long(argc, argv, options_string, long_options, &option_index)) != -1) { switch (o) { @@ -238,6 +239,9 @@ int main(int argc, char *argv[]) { FREE(pattern); pattern = strdup(optarg); break; + case 'm': + prompt = strdup(optarg); + break; case 'h': printf("i3-nagbar " I3_VERSION); printf("i3-nagbar [-s ] [-p ] [-l ] [-P ] [-f ] [-v]\n");