From f7971fc0e69c395d3fc2ba60fdf354f7d7c08831 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 3 Apr 2017 08:51:25 +0200 Subject: [PATCH] Add list of available modi to help output. --- source/rofi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/rofi.c b/source/rofi.c index 7e326a9c..6f262697 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -299,6 +299,23 @@ static void help ( G_GNUC_UNUSED int argc, char **argv ) print_options (); printf ( "\n" ); x11_dump_monitor_layout (); + printf("\n"); + printf("Detected modi:\n"); + for ( unsigned int i = 0; i < num_available_modi; i++ ) { + gboolean active = FALSE; + for ( unsigned int j = 0; j < num_modi; j++ ) { + if ( modi[j] == available_modi[i] ) { + active = TRUE; + break; + } + } + fprintf ( stderr, " * %s%s%s%s\n", + active?"+":"" , + is_term ? (active?color_green:color_red) : "", + available_modi[i]->name, + is_term ? color_reset : "" + ); + } printf ( "\n" ); printf ( "Compile time options:\n" ); #ifdef WINDOW_MODE