mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-10 15:44:41 -05:00
Add main application options to -h
This commit is contained in:
parent
bc7a89c646
commit
d21ba860f0
1 changed files with 41 additions and 1 deletions
|
@ -1632,13 +1632,53 @@ static void handle_keypress ( XEvent *ev )
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Help function. This calls man.
|
* Help function.
|
||||||
*/
|
*/
|
||||||
|
static void print_main_application_options ( void )
|
||||||
|
{
|
||||||
|
int is_term = isatty ( fileno ( stdout ) );
|
||||||
|
if ( is_term ) {
|
||||||
|
printf ( "\t"color_bold "-no-config"color_reset " Do not load configuration, use default values.\n" );
|
||||||
|
printf ( "\t"color_bold "-quiet"color_reset " Suppress information messages.\n" );
|
||||||
|
printf ( "\t"color_bold "-v,-version"color_reset " Print the version number and exit.\n" );
|
||||||
|
printf ( "\t"color_bold "-dmenu"color_reset " Start in dmenu mode.\n" );
|
||||||
|
printf ( "\t"color_bold "-display [string]"color_reset " X server to contact.\n" );
|
||||||
|
printf ( "\t\t"color_italic "${DISPLAY}"color_reset "\n" );
|
||||||
|
printf ( "\t"color_bold "-h,-help"color_reset " This help message.\n" );
|
||||||
|
printf (
|
||||||
|
"\t"color_bold "-dump-xresources"color_reset
|
||||||
|
" Dump the current configuration in Xresources format and exit.\n" );
|
||||||
|
printf (
|
||||||
|
"\t"color_bold "-e [string]"color_reset " Show a dialog displaying the passed message and exit.\n" );
|
||||||
|
printf ( "\t"color_bold "-markup"color_reset " Enable pango markup where possible.\n" );
|
||||||
|
printf (
|
||||||
|
"\t"color_bold "-normal-window"color_reset
|
||||||
|
" In dmenu mode, behave as a normal window. (experimental)\n" );
|
||||||
|
printf (
|
||||||
|
"\t"color_bold "-show [mode]"color_reset
|
||||||
|
" Show the mode 'mode' and exit. The mode has to be enabled.\n" );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
printf ( "\t-no-config Do not load configuration, use default values.\n" );
|
||||||
|
printf ( "\t-quiet Suppress information messages.\n" );
|
||||||
|
printf ( "\t-v,-version Print the version number and exit.\n" );
|
||||||
|
printf ( "\t-dmenu Start in dmenu mode.\n" );
|
||||||
|
printf ( "\t-display [string] X server to contact.\n" );
|
||||||
|
printf ( "\t\t${DISPLAY}\n" );
|
||||||
|
printf ( "\t-h,-help This help message.\n" );
|
||||||
|
printf ( "\t-dump-xresources Dump the current configuration in Xresources format and exit.\n" );
|
||||||
|
printf ( "\t-e [string] Show a dialog displaying the passed message and exit.\n" );
|
||||||
|
printf ( "\t-markup Enable pango markup where possible.\n" );
|
||||||
|
printf ( "\t-normal-window In dmenu mode, behave as a normal window. (experimental)\n" );
|
||||||
|
printf ( "\t-show [mode] Show the mode 'mode' and exit. The mode has to be enabled.\n" );
|
||||||
|
}
|
||||||
|
}
|
||||||
static void help ( G_GNUC_UNUSED int argc, char **argv )
|
static void help ( G_GNUC_UNUSED int argc, char **argv )
|
||||||
{
|
{
|
||||||
printf ( "%s usage:\n", argv[0] );
|
printf ( "%s usage:\n", argv[0] );
|
||||||
printf ( "\t%s [-options ...]\n\n", argv[0] );
|
printf ( "\t%s [-options ...]\n\n", argv[0] );
|
||||||
printf ( "where options include:\n" );
|
printf ( "where options include:\n" );
|
||||||
|
print_main_application_options ();
|
||||||
print_options ();
|
print_options ();
|
||||||
printf ( "\n" );
|
printf ( "\n" );
|
||||||
printf ( "For more information see: man rofi\n" );
|
printf ( "For more information see: man rofi\n" );
|
||||||
|
|
Loading…
Add table
Reference in a new issue