diff options
author | sabetts <sabetts> | 2003-04-13 23:59:53 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-04-13 23:59:53 +0000 |
commit | a08bd72e917f0fc34615d91fff047b8a215d5e46 (patch) | |
tree | 82296ffa0169d7d22d74328d906f11f74c072bb3 | |
parent | 5c9807f849eb0eba01c8c7609346d238f5dac3df (diff) | |
download | ratpoison-a08bd72e917f0fc34615d91fff047b8a215d5e46.zip |
(main): add switch case for the display command line
option.
(print_help): add --display option. Add text to demonstrate
--display and --command take an argument.
(ratpoison_longopts): add display.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | doc/ratpoison.texi | 3 | ||||
-rw-r--r-- | src/main.c | 10 |
4 files changed, 21 insertions, 2 deletions
@@ -1,5 +1,11 @@ 2003-04-13 Shawn Betts <sabetts@sfu.ca> + * src/main.c (main): add switch case for the display command line + option. + (print_help): add --display option. Add text to demonstrate + --display and --command take an argument. + (ratpoison_longopts): add display. + * src/manage.c (get_wmname): add debugging output to print returned elements from X11 call. @@ -1,5 +1,9 @@ ratpoison NEWS --- history of user-visible changes. -*- outline -*- +* Changes since 1.2.0-beta3 +** new command line argument --display +Now you can specify the display to connect to. + * Changes since 1.2.0-beta2 * Changes since 1.1.1 diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi index bfdcb49..dee39a1 100644 --- a/doc/ratpoison.texi +++ b/doc/ratpoison.texi @@ -880,6 +880,9 @@ Display this help screen @item -v, --version Display the version +@item -d, --display +Specify the X display to connect to. + @item -c, --command Send ratpoison a colon-command. This allows you to control ratpoison from the command-line. with the @option{-c} option you can script @@ -94,6 +94,7 @@ static struct option ratpoison_longopts[] = { {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, {"command", required_argument, 0, 'c'}, + {"display", required_argument, 0, 'd'}, {0, 0, 0, 0} }; static char ratpoison_opts[] = "hvc:"; @@ -311,7 +312,8 @@ print_help () printf ("Help for %s %s\n\n", PACKAGE, VERSION); printf ("-h, --help Display this help screen\n"); printf ("-v, --version Display the version\n"); - printf ("-c, --command Send ratpoison a colon-command\n\n"); + printf ("-d, --display <dpy> Set the X display to use\n"); + printf ("-c, --command <cmd> Send ratpoison a colon-command\n\n"); printf ("Report bugs to ratpoison-devel@lists.sourceforge.net\n\n"); @@ -498,6 +500,7 @@ main (int argc, char *argv[]) int c; char **command = NULL; int cmd_count = 0; + char *display = NULL; myargv = argv; @@ -531,12 +534,15 @@ main (int argc, char *argv[]) command[cmd_count] = xstrdup (optarg); cmd_count++; break; + case 'd': + display = xstrdup (optarg); + break; default: exit (EXIT_FAILURE); } } - if (!(dpy = XOpenDisplay (NULL))) + if (!(dpy = XOpenDisplay (display))) { fprintf (stderr, "Can't open display\n"); return EXIT_FAILURE; |