diff --git a/doc/help-output.txt b/doc/help-output.txt index d89449e1..f740c4fa 100644 --- a/doc/help-output.txt +++ b/doc/help-output.txt @@ -15,6 +15,7 @@ Command line only options: -show [mode] Show the mode 'mode' and exit. The mode has to be enabled. -no-lazy-grab Disable lazy grab that, when fail to grab keyboard, does not block but retry later. -no-plugins Disable loading of external plugins. + -plugin-path Directory used to search for rofi plugins. -dump-config Dump the current configuration in rasi format and exit. -dump-theme Dump the current theme in rasi format and exit. DMENU command line options: diff --git a/doc/test_xr.txt b/doc/test_xr.txt index 6e20e209..b5a29e39 100644 --- a/doc/test_xr.txt +++ b/doc/test_xr.txt @@ -106,8 +106,6 @@ rofi.scroll-method: 0 ! rofi.color-active: ! "Color scheme window" Set from: Default ! rofi.color-window: -! "Directory containing plugins" Set from: File -rofi.plugin-path: /usr/lib/rofi ! "Max history size (WARNING: can cause slowdowns when set to high)." Set from: Default ! rofi.max-history-size: 25 ! "Pidfile location" Set from: File diff --git a/pkgconfig/rofi.pc.in b/pkgconfig/rofi.pc.in index b9a69359..0c290594 100644 --- a/pkgconfig/rofi.pc.in +++ b/pkgconfig/rofi.pc.in @@ -3,6 +3,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +pluginsdir=@libdir@/rofi/ Name: rofi Description: Header files for rofi plugins diff --git a/source/rofi.c b/source/rofi.c index d4b31ad8..170715f5 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -274,6 +274,7 @@ 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 ( "-plugin-path", "", "Directory used to search for rofi plugins.", NULL, is_term ); print_help_msg ( "-dump-config", "", "Dump the current configuration 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 ); } @@ -488,7 +489,7 @@ static void rofi_collect_modi_dir ( const char *base_dir ) if ( !g_str_has_suffix ( dn, G_MODULE_SUFFIX ) ) { continue; } - char *fn = g_build_filename ( PLUGIN_PATH, dn, NULL ); + char *fn = g_build_filename ( base_dir, dn, NULL ); GModule *mod = g_module_open ( fn, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL ); if ( mod ) { Mode *m = NULL; @@ -536,6 +537,8 @@ static void rofi_collect_modi ( void ) rofi_collect_modi_add ( &help_keys_mode ); if ( find_arg ( "-no-plugins" ) < 0 ) { + find_arg_str ( "-plugin-path", &(config.plugin_path) ); + g_debug ( "Parse plugin path: %s", config.plugin_path ); rofi_collect_modi_dir ( config.plugin_path ); } } diff --git a/source/xrmoptions.c b/source/xrmoptions.c index 74a95853..9a0f155e 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -202,8 +202,6 @@ static XrmOption xrmOptions[] = { "Color scheme for active row", CONFIG_DEFAULT }, { xrm_String, "color-window", { .str = &config.color_window }, NULL, "Color scheme window", CONFIG_DEFAULT }, - { xrm_String, "plugin-path", { .str = &config.plugin_path }, NULL, - "Directory containing plugins", CONFIG_DEFAULT }, { xrm_Number, "max-history-size", { .num = &config.max_history_size }, NULL, "Max history size (WARNING: can cause slowdowns when set to high).", CONFIG_DEFAULT }, };