summaryrefslogtreecommitdiffstats
path: root/source/rofi.c
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-06-21 08:19:47 +0200
committerDave Davenport <qball@gmpclient.org>2017-06-21 08:19:47 +0200
commit77a4d97262c3a1837d4b3752c2f222d7ea097703 (patch)
tree5310f88fd6155cd6ea5586663fdaa6532eed8183 /source/rofi.c
parent9af191de26611ce5025e3363dafd0cdbf8ab38b9 (diff)
Add -dump-config option.
Diffstat (limited to 'source/rofi.c')
-rw-r--r--source/rofi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/rofi.c b/source/rofi.c
index 39013f09..fbce9631 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -267,6 +267,8 @@ static void print_main_application_options ( int is_term )
print_help_msg ( "-show", "[mode]", "Show the mode 'mode' and exit. The mode has to be enabled.", NULL, is_term );
print_help_msg ( "-no-lazy-grab", "", "Disable lazy grab that, when fail to grab keyboard, does not block but retry later.", NULL, is_term );
print_help_msg ( "-no-plugins", "", "Disable loading of external plugins.", NULL, is_term );
+ print_help_msg ( "-dump-config", "", "Dump the current configuration and theme in rasi format and exit.", NULL, is_term );
+ print_help_msg ( "-dump-theme", "", "Dump the current theme in rasi format and exit.", NULL, is_term );
}
static void help ( G_GNUC_UNUSED int argc, char **argv )
{
@@ -895,6 +897,11 @@ int main ( int argc, char *argv[] )
cleanup ();
return EXIT_SUCCESS;
}
+ if ( find_arg ( "-dump-config" ) >= 0 ) {
+ rofi_dump_config ( rofi_theme );
+ cleanup ();
+ return EXIT_SUCCESS;
+ }
// Dump.
// catch help request
if ( find_arg ( "-h" ) >= 0 || find_arg ( "-help" ) >= 0 || find_arg ( "--help" ) >= 0 ) {