wmmisc: Add support for wmgeneral's -display command line argument
This commit is contained in:
parent
21c9a972a6
commit
01bb8bdecf
|
@ -18,6 +18,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -42,7 +43,8 @@ dockapp_show_help( const char* wm_name )
|
|||
printf( "Number of users logged in, total processes, total number of processes running,\n" );
|
||||
printf( "the system's fork count and load average.\n\n" );
|
||||
printf( " -h display this help and exit\n" );
|
||||
printf( " -v output version information and exit\n\n" );
|
||||
printf( " -v output version information and exit\n" );
|
||||
printf( " -display DISPLAY set display\n\n");
|
||||
printf( "Report bugs to <" PACKAGE_BUGREPORT ">.\n" );
|
||||
}
|
||||
|
||||
|
@ -97,6 +99,10 @@ int
|
|||
main( int argc, char** argv )
|
||||
{
|
||||
int opt = 0;
|
||||
const struct option longopts[] = {
|
||||
{"display", required_argument, NULL, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
#ifdef USE_MTRACE
|
||||
mtrace();
|
||||
|
@ -105,7 +111,7 @@ main( int argc, char** argv )
|
|||
signal( SIGINT, dockapp_exit );
|
||||
signal( SIGSEGV, dockapp_crash );
|
||||
|
||||
opt = getopt( argc, argv, "hv" );
|
||||
opt = getopt_long_only( argc, argv, "hv", longopts, NULL);
|
||||
|
||||
while ( -1 != opt )
|
||||
{
|
||||
|
@ -126,7 +132,7 @@ main( int argc, char** argv )
|
|||
}
|
||||
}
|
||||
|
||||
opt = getopt( argc, argv, "hv" );
|
||||
opt = getopt_long_only( argc, argv, "hv", longopts, NULL);
|
||||
}
|
||||
|
||||
createXBMfromXPM( wmmisc_mask_bits,
|
||||
|
|
|
@ -37,7 +37,9 @@ Output version information and exit
|
|||
.TP
|
||||
.B \-h
|
||||
Display help and exit
|
||||
|
||||
.TP
|
||||
.B \-display DISPLAY
|
||||
Set display
|
||||
.SH BUGS
|
||||
Report bugs and suggestion to the current \fBwmmisc\fR maintainer:
|
||||
Jesse S. <luxorfalls@sbcglobal.net>.
|
||||
|
|
Loading…
Reference in a new issue