mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Add dir parser function
This commit is contained in:
parent
86dc1e1448
commit
8ee37012d1
1 changed files with 23 additions and 17 deletions
|
@ -439,24 +439,10 @@ static gboolean rofi_collect_modi_add ( Mode *mode )
|
|||
}
|
||||
return FALSE;
|
||||
}
|
||||
/**
|
||||
* Find all available modi.
|
||||
*/
|
||||
static void rofi_collect_modi ( void )
|
||||
{
|
||||
#ifdef WINDOW_MODE
|
||||
rofi_collect_modi_add ( &window_mode );
|
||||
rofi_collect_modi_add ( &window_mode_cd );
|
||||
#endif
|
||||
rofi_collect_modi_add ( &run_mode );
|
||||
rofi_collect_modi_add ( &ssh_mode );
|
||||
#ifdef ENABLE_DRUN
|
||||
rofi_collect_modi_add ( &drun_mode );
|
||||
#endif
|
||||
rofi_collect_modi_add ( &combi_mode );
|
||||
rofi_collect_modi_add ( &help_keys_mode );
|
||||
|
||||
GDir *dir = g_dir_open ( PLUGIN_PATH, 0, NULL );
|
||||
static void rofi_collect_modi_dir ( const char *base_dir )
|
||||
{
|
||||
GDir *dir = g_dir_open ( base_dir, 0, NULL );
|
||||
if ( dir ) {
|
||||
const char *dn = NULL;
|
||||
while ( ( dn = g_dir_read_name ( dir ) ) )
|
||||
|
@ -489,6 +475,26 @@ static void rofi_collect_modi ( void )
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all available modi.
|
||||
*/
|
||||
static void rofi_collect_modi ( void )
|
||||
{
|
||||
#ifdef WINDOW_MODE
|
||||
rofi_collect_modi_add ( &window_mode );
|
||||
rofi_collect_modi_add ( &window_mode_cd );
|
||||
#endif
|
||||
rofi_collect_modi_add ( &run_mode );
|
||||
rofi_collect_modi_add ( &ssh_mode );
|
||||
#ifdef ENABLE_DRUN
|
||||
rofi_collect_modi_add ( &drun_mode );
|
||||
#endif
|
||||
rofi_collect_modi_add ( &combi_mode );
|
||||
rofi_collect_modi_add ( &help_keys_mode );
|
||||
|
||||
rofi_collect_modi_dir ( PLUGIN_PATH );
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup configuration for config.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue