rofi  1.6.0
script.c
Go to the documentation of this file.
1 /*
2  * rofi
3  *
4  * MIT/X11 License
5  * Copyright © 2013-2020 Qball Cow <qball@gmpclient.org>
6  *
7  * Permission is hereby granted, free of charge, to any person obtaining
8  * a copy of this software and associated documentation files (the
9  * "Software"), to deal in the Software without restriction, including
10  * without limitation the rights to use, copy, modify, merge, publish,
11  * distribute, sublicense, and/or sell copies of the Software, and to
12  * permit persons to whom the Software is furnished to do so, subject to
13  * the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be
16  * included in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25  *
26  */
27 
29 #define G_LOG_DOMAIN "Dialogs.Script"
30 
31 #include <config.h>
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <unistd.h>
35 #include <strings.h>
36 #include <string.h>
37 #include <ctype.h>
38 #include <assert.h>
39 #include <errno.h>
40 #include "rofi.h"
41 #include "dialogs/script.h"
42 #include "helper.h"
43 
44 #include "widgets/textbox.h"
45 
46 #include "mode-private.h"
47 
48 #include "rofi-icon-fetcher.h"
49 
51 
52 typedef struct
53 {
55  unsigned int id;
59  unsigned int cmd_list_length;
60 
63  unsigned int num_urgent_list;
66  unsigned int num_active_list;
68  char *message;
69  char *prompt;
70  gboolean do_markup;
71  char delim;
73  gboolean no_custom;
75 
79 void dmenuscript_parse_entry_extras ( G_GNUC_UNUSED Mode *sw, DmenuScriptEntry *entry, char *buffer, size_t length )
80 {
81  gchar **extras = g_strsplit ( buffer, "\x1f", -1 );
82  gchar **extra;
83  for ( extra = extras; *extra != NULL && *( extra + 1 ) != NULL; extra += 2 ) {
84  gchar *key = *extra;
85  gchar *value = *( extra + 1 );
86  if ( strcasecmp ( key, "icon" ) == 0 ) {
87  entry->icon_name = value;
88  }
89  else if ( strcasecmp ( key, "meta" ) == 0 ) {
90  entry->meta = value;
91  }
92  else if ( strcasecmp ( key, "info" ) == 0 ) {
93  entry->info = value;
94  }
95  else if ( strcasecmp ( key, "nonselectable" ) == 0 ) {
96  entry->nonselectable = strcasecmp ( value, "true" ) == 0;
97  g_free ( value );
98  }
99  else {
100  g_free ( value );
101  }
102  g_free ( key );
103  }
104  g_free ( extras );
105 }
106 
111 static void parse_header_entry ( Mode *sw, char *line, ssize_t length )
112 {
114  ssize_t length_key = 0;//strlen ( line );
115  while ( length_key < length && line[length_key] != '\x1f' ) {
116  length_key++;
117  }
118 
119  if ( ( length_key + 1 ) < length ) {
120  line[length_key] = '\0';
121  char *value = line + length_key + 1;
122  if ( strcasecmp ( line, "message" ) == 0 ) {
123  g_free ( pd->message );
124  pd->message = strlen ( value ) ? g_strdup ( value ) : NULL;
125  }
126  else if ( strcasecmp ( line, "prompt" ) == 0 ) {
127  g_free ( pd->prompt );
128  pd->prompt = g_strdup ( value );
129  sw->display_name = pd->prompt;
130  }
131  else if ( strcasecmp ( line, "markup-rows" ) == 0 ) {
132  pd->do_markup = ( strcasecmp ( value, "true" ) == 0 );
133  }
134  else if ( strcasecmp ( line, "urgent" ) == 0 ) {
135  parse_ranges ( value, &( pd->urgent_list ), &( pd->num_urgent_list ) );
136  }
137  else if ( strcasecmp ( line, "active" ) == 0 ) {
138  parse_ranges ( value, &( pd->active_list ), &( pd->num_active_list ) );
139  }
140  else if ( strcasecmp ( line, "delim" ) == 0 ) {
141  pd->delim = helper_parse_char ( value );
142  }
143  else if ( strcasecmp ( line, "no-custom" ) == 0 ) {
144  pd->no_custom = ( strcasecmp ( value, "true" ) == 0 );
145  }
146  }
147 }
148 
149 static DmenuScriptEntry *execute_executor ( Mode *sw, char *arg, unsigned int *length, int value, DmenuScriptEntry *entry )
150 {
152  int fd = -1;
153  GError *error = NULL;
154  DmenuScriptEntry *retv = NULL;
155  char **argv = NULL;
156  int argc = 0;
157  *length = 0;
158 
159  // Environment
160  char ** env = g_get_environ ();
161 
162  char *str_value = g_strdup_printf ( "%d", value );
163  env = g_environ_setenv ( env, "ROFI_RETV", str_value, TRUE );
164  g_free ( str_value );
165 
166  str_value = g_strdup_printf ( "%d", (int) getpid () );
167  env = g_environ_setenv ( env, "ROFI_OUTSIDE", str_value, TRUE );
168  g_free ( str_value );
169 
170  if ( entry && entry->info ) {
171  env = g_environ_setenv ( env, "ROFI_INFO", entry->info, TRUE );
172  }
173 
174  if ( g_shell_parse_argv ( sw->ed, &argc, &argv, &error ) ) {
175  argv = g_realloc ( argv, ( argc + 2 ) * sizeof ( char* ) );
176  argv[argc] = g_strdup ( arg );
177  argv[argc + 1] = NULL;
178  g_spawn_async_with_pipes ( NULL, argv, env, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &fd, NULL, &error );
179  }
180  g_strfreev ( env );
181  if ( error != NULL ) {
182  char *msg = g_strdup_printf ( "Failed to execute: '%s'\nError: '%s'", (char *) sw->ed, error->message );
183  rofi_view_error_dialog ( msg, FALSE );
184  g_free ( msg );
185  // print error.
186  g_error_free ( error );
187  fd = -1;
188  }
189  if ( fd >= 0 ) {
190  FILE *inp = fdopen ( fd, "r" );
191  if ( inp ) {
192  char *buffer = NULL;
193  size_t buffer_length = 0;
194  ssize_t read_length = 0;
195  size_t actual_size = 0;
196  while ( ( read_length = getdelim ( &buffer, &buffer_length, pd->delim, inp ) ) > 0 ) {
197  // Filter out line-end.
198  if ( buffer[read_length - 1] == pd->delim ) {
199  buffer[read_length - 1] = '\0';
200  }
201  if ( buffer[0] == '\0' ) {
202  parse_header_entry ( sw, &buffer[1], read_length - 1 );
203  }
204  else {
205  if ( actual_size < ( ( *length ) + 2 ) ) {
206  actual_size += 256;
207  retv = g_realloc ( retv, ( actual_size ) * sizeof ( DmenuScriptEntry ) );
208  }
209  size_t buf_length = strlen ( buffer ) + 1;
210  retv[( *length )].entry = g_memdup ( buffer, buf_length );
211  retv[( *length )].icon_name = NULL;
212  retv[( *length )].meta = NULL;
213  retv[( *length )].info = NULL;
214  retv[( *length )].icon_fetch_uid = 0;
215  retv[( *length )].nonselectable = FALSE;
216  if ( buf_length > 0 && ( read_length > (ssize_t) buf_length ) ) {
217  dmenuscript_parse_entry_extras ( sw, &( retv[( *length )] ), buffer + buf_length, read_length - buf_length );
218  }
219  retv[( *length ) + 1].entry = NULL;
220  ( *length )++;
221  }
222  }
223  if ( buffer ) {
224  free ( buffer );
225  }
226  if ( fclose ( inp ) != 0 ) {
227  g_warning ( "Failed to close stdout off executor script: '%s'",
228  g_strerror ( errno ) );
229  }
230  }
231  }
232  g_strfreev ( argv );
233  return retv;
234 }
235 
236 static void script_switcher_free ( Mode *sw )
237 {
238  if ( sw == NULL ) {
239  return;
240  }
241  g_free ( sw->name );
242  g_free ( sw->ed );
243  g_free ( sw );
244 }
245 
246 static int script_mode_init ( Mode *sw )
247 {
248  if ( sw->private_data == NULL ) {
249  ScriptModePrivateData *pd = g_malloc0 ( sizeof ( *pd ) );
250  pd->delim = '\n';
251  sw->private_data = (void *) pd;
252  pd->cmd_list = execute_executor ( sw, NULL, &( pd->cmd_list_length ), 0, NULL );
253  }
254  return TRUE;
255 }
256 static unsigned int script_mode_get_num_entries ( const Mode *sw )
257 {
258  const ScriptModePrivateData *rmpd = (const ScriptModePrivateData *) sw->private_data;
259  return rmpd->cmd_list_length;
260 }
261 
263 {
265 
266  rmpd->num_urgent_list = 0;
267  g_free ( rmpd->urgent_list );
268  rmpd->urgent_list = NULL;
269  rmpd->num_active_list = 0;
270  g_free ( rmpd->active_list );
271  rmpd->active_list = NULL;
272 }
273 
274 static ModeMode script_mode_result ( Mode *sw, int mretv, char **input, unsigned int selected_line )
275 {
277  ModeMode retv = MODE_EXIT;
278  DmenuScriptEntry *new_list = NULL;
279  unsigned int new_length = 0;
280 
281  if ( ( mretv & MENU_NEXT ) ) {
282  retv = NEXT_DIALOG;
283  }
284  else if ( ( mretv & MENU_PREVIOUS ) ) {
285  retv = PREVIOUS_DIALOG;
286  }
287  else if ( ( mretv & MENU_QUICK_SWITCH ) ) {
288  //retv = 1+( mretv & MENU_LOWER_MASK );
290  if ( selected_line != UINT32_MAX ) {
291  new_list = execute_executor ( sw, rmpd->cmd_list[selected_line].entry, &new_length, 10 + ( mretv & MENU_LOWER_MASK ), &( rmpd->cmd_list[selected_line] ) );
292  }
293  else {
294  if ( rmpd->no_custom == FALSE ) {
295  new_list = execute_executor ( sw, *input, &new_length, 10 + ( mretv & MENU_LOWER_MASK ), NULL );
296  }
297  else {
298  return RELOAD_DIALOG;
299  }
300  }
301  }
302  else if ( ( mretv & MENU_OK ) && rmpd->cmd_list[selected_line].entry != NULL ) {
303  if ( rmpd->cmd_list[selected_line].nonselectable ) {
304  return RELOAD_DIALOG;
305  }
307  new_list = execute_executor ( sw, rmpd->cmd_list[selected_line].entry, &new_length, 1, &( rmpd->cmd_list[selected_line] ) );
308  }
309  else if ( ( mretv & MENU_CUSTOM_INPUT ) && *input != NULL && *input[0] != '\0' ) {
310  if ( rmpd->no_custom == FALSE ) {
312  new_list = execute_executor ( sw, *input, &new_length, 2, NULL );
313  }
314  else {
315  return RELOAD_DIALOG;
316  }
317  }
318 
319  // If a new list was generated, use that an loop around.
320  if ( new_list != NULL ) {
321  for ( unsigned int i = 0; i < rmpd->cmd_list_length; i++ ) {
322  g_free ( rmpd->cmd_list[i].entry );
323  g_free ( rmpd->cmd_list[i].icon_name );
324  g_free ( rmpd->cmd_list[i].meta );
325  }
326  g_free ( rmpd->cmd_list );
327 
328  rmpd->cmd_list = new_list;
329  rmpd->cmd_list_length = new_length;
330  retv = RESET_DIALOG;
331  }
332  return retv;
333 }
334 
335 static void script_mode_destroy ( Mode *sw )
336 {
338  if ( rmpd != NULL ) {
339  for ( unsigned int i = 0; i < rmpd->cmd_list_length; i++ ) {
340  g_free ( rmpd->cmd_list[i].entry );
341  g_free ( rmpd->cmd_list[i].icon_name );
342  g_free ( rmpd->cmd_list[i].meta );
343  }
344  g_free ( rmpd->cmd_list );
345  g_free ( rmpd->message );
346  g_free ( rmpd->prompt );
347  g_free ( rmpd->urgent_list );
348  g_free ( rmpd->active_list );
349  g_free ( rmpd );
350  sw->private_data = NULL;
351  }
352 }
353 static inline unsigned int get_index ( unsigned int length, int index )
354 {
355  if ( index >= 0 ) {
356  return index;
357  }
358  if ( ( (unsigned int) -index ) <= length ) {
359  return length + index;
360  }
361  // Out of range.
362  return UINT_MAX;
363 }
364 static char *_get_display_value ( const Mode *sw, unsigned int selected_line, G_GNUC_UNUSED int *state, G_GNUC_UNUSED GList **list, int get_entry )
365 {
367  for ( unsigned int i = 0; i < pd->num_active_list; i++ ) {
368  unsigned int start = get_index ( pd->cmd_list_length, pd->active_list[i].start );
369  unsigned int stop = get_index ( pd->cmd_list_length, pd->active_list[i].stop );
370  if ( selected_line >= start && selected_line <= stop ) {
371  *state |= ACTIVE;
372  }
373  }
374  for ( unsigned int i = 0; i < pd->num_urgent_list; i++ ) {
375  unsigned int start = get_index ( pd->cmd_list_length, pd->urgent_list[i].start );
376  unsigned int stop = get_index ( pd->cmd_list_length, pd->urgent_list[i].stop );
377  if ( selected_line >= start && selected_line <= stop ) {
378  *state |= URGENT;
379  }
380  }
381  if ( pd->do_markup ) {
382  *state |= MARKUP;
383  }
384  return get_entry ? g_strdup ( pd->cmd_list[selected_line].entry ) : NULL;
385 }
386 
387 static int script_token_match ( const Mode *sw, rofi_int_matcher **tokens, unsigned int index )
388 {
390  int match = 1;
391  if ( tokens ) {
392  for ( int j = 0; match && tokens != NULL && tokens[j] != NULL; j++ ) {
393  rofi_int_matcher *ftokens[2] = { tokens[j], NULL };
394  int test = 0;
395  test = helper_token_match ( ftokens, rmpd->cmd_list[index].entry );
396  if ( test == tokens[j]->invert && rmpd->cmd_list[index].meta ) {
397  test = helper_token_match ( ftokens, rmpd->cmd_list[index].meta );
398  }
399 
400  if ( test == 0 ) {
401  match = 0;
402  }
403  }
404  }
405  return match;
406 }
407 static char *script_get_message ( const Mode *sw )
408 {
410  return g_strdup ( pd->message );
411 }
412 static cairo_surface_t *script_get_icon ( const Mode *sw, unsigned int selected_line, int height )
413 {
415  g_return_val_if_fail ( pd->cmd_list != NULL, NULL );
416  DmenuScriptEntry *dr = &( pd->cmd_list[selected_line] );
417  if ( dr->icon_name == NULL ) {
418  return NULL;
419  }
420  if ( dr->icon_fetch_uid > 0 ) {
421  return rofi_icon_fetcher_get ( dr->icon_fetch_uid );
422  }
423  dr->icon_fetch_uid = rofi_icon_fetcher_query ( dr->icon_name, height );
424  return rofi_icon_fetcher_get ( dr->icon_fetch_uid );
425 }
426 
427 #include "mode-private.h"
428 Mode *script_switcher_parse_setup ( const char *str )
429 {
430  Mode *sw = g_malloc0 ( sizeof ( *sw ) );
431  char *endp = NULL;
432  char *parse = g_strdup ( str );
433  unsigned int index = 0;
434  const char *const sep = ":";
435  for ( char *token = strtok_r ( parse, sep, &endp ); token != NULL; token = strtok_r ( NULL, sep, &endp ) ) {
436  if ( index == 0 ) {
437  sw->name = g_strdup ( token );
438  }
439  else if ( index == 1 ) {
440  sw->ed = (void *) rofi_expand_path ( token );
441  }
442  index++;
443  }
444  g_free ( parse );
445  if ( index == 2 ) {
447  sw->_init = script_mode_init;
454  sw->_get_completion = NULL,
455  sw->_preprocess_input = NULL,
457 
458  return sw;
459  }
460  fprintf ( stderr, "The script command '%s' has %u options, but needs 2: <name>:<script>.", str, index );
461  script_switcher_free ( sw );
462  return NULL;
463 }
464 
465 gboolean script_switcher_is_valid ( const char *token )
466 {
467  return strchr ( token, ':' ) != NULL;
468 }
RESET_DIALOG
@ RESET_DIALOG
Definition: mode.h:60
rofi_range_pair
Definition: rofi-types.h:258
MENU_QUICK_SWITCH
@ MENU_QUICK_SWITCH
Definition: mode.h:79
DmenuScriptEntry::nonselectable
gboolean nonselectable
Definition: dmenuscriptshared.h:19
ACTIVE
@ ACTIVE
Definition: textbox.h:98
script_mode_result
static ModeMode script_mode_result(Mode *sw, int mretv, char **input, unsigned int selected_line)
Definition: script.c:274
rofi_mode::name
char * name
Definition: mode-private.h:156
ScriptModePrivateData::num_active_list
unsigned int num_active_list
Definition: script.c:66
DmenuScriptEntry::info
char * info
Definition: dmenuscriptshared.h:16
MARKUP
@ MARKUP
Definition: textbox.h:102
helper_parse_char
char helper_parse_char(const char *arg)
Definition: helper.c:329
rofi_mode::_init
__mode_init _init
Definition: mode-private.h:164
MENU_OK
@ MENU_OK
Definition: mode.h:69
rofi_int_matcher_t
Definition: rofi-types.h:267
DmenuScriptEntry::icon_fetch_uid
uint32_t icon_fetch_uid
Definition: dmenuscriptshared.h:11
rofi_mode::ed
void * ed
Definition: mode-private.h:194
_get_display_value
static char * _get_display_value(const Mode *sw, unsigned int selected_line, G_GNUC_UNUSED int *state, G_GNUC_UNUSED GList **list, int get_entry)
Definition: script.c:364
PREVIOUS_DIALOG
@ PREVIOUS_DIALOG
Definition: mode.h:58
rofi_view_error_dialog
int rofi_view_error_dialog(const char *msg, int markup)
Definition: view.c:1886
ScriptModePrivateData::do_markup
gboolean do_markup
Definition: script.c:70
MENU_PREVIOUS
@ MENU_PREVIOUS
Definition: mode.h:81
rofi_mode::_token_match
_mode_token_match _token_match
Definition: mode-private.h:172
rofi_range_pair::start
int start
Definition: rofi-types.h:259
NEXT_DIALOG
@ NEXT_DIALOG
Definition: mode.h:54
script_get_icon
static cairo_surface_t * script_get_icon(const Mode *sw, unsigned int selected_line, int height)
Definition: script.c:412
ScriptModePrivateData::id
unsigned int id
Definition: script.c:55
rofi_mode::_get_icon
_mode_get_icon _get_icon
Definition: mode-private.h:176
rofi_mode::_preprocess_input
_mode_preprocess_input _preprocess_input
Definition: mode-private.h:180
script_switcher_free
static void script_switcher_free(Mode *sw)
Definition: script.c:236
ScriptModePrivateData::message
char * message
Definition: script.c:68
script_mode_get_num_entries
static unsigned int script_mode_get_num_entries(const Mode *sw)
Definition: script.c:256
mode-private.h
DmenuScriptEntry::meta
char * meta
Definition: dmenuscriptshared.h:13
ScriptModePrivateData::active_list
struct rofi_range_pair * active_list
Definition: script.c:65
script_switcher_parse_setup
Mode * script_switcher_parse_setup(const char *str)
Definition: script.c:428
DmenuScriptEntry::icon_name
char * icon_name
Definition: dmenuscriptshared.h:9
MODE_EXIT
@ MODE_EXIT
Definition: mode.h:52
ScriptModePrivateData
Definition: script.c:53
ScriptModePrivateData::prompt
char * prompt
Definition: script.c:69
dmenuscriptshared.h
execute_executor
static DmenuScriptEntry * execute_executor(Mode *sw, char *arg, unsigned int *length, int value, DmenuScriptEntry *entry)
Definition: script.c:149
rofi_icon_fetcher_get
cairo_surface_t * rofi_icon_fetcher_get(const uint32_t uid)
Definition: rofi-icon-fetcher.c:307
rofi_mode::free
_mode_free free
Definition: mode-private.h:192
rofi_range_pair::stop
int stop
Definition: rofi-types.h:260
rofi_expand_path
char * rofi_expand_path(const char *input)
Definition: helper.c:664
URGENT
@ URGENT
Definition: textbox.h:96
rofi_mode
Definition: mode-private.h:152
DmenuScriptEntry::entry
char * entry
Definition: dmenuscriptshared.h:7
rofi.h
rofi_mode::private_data
void * private_data
Definition: mode-private.h:185
ScriptModePrivateData::urgent_list
struct rofi_range_pair * urgent_list
Definition: script.c:62
ScriptModePrivateData::delim
char delim
Definition: script.c:71
rofi_mode::_destroy
__mode_destroy _destroy
Definition: mode-private.h:166
MENU_CUSTOM_INPUT
@ MENU_CUSTOM_INPUT
Definition: mode.h:75
rofi_mode::display_name
char * display_name
Definition: mode-private.h:158
mode_get_private_data
void * mode_get_private_data(const Mode *mode)
Definition: mode.c:128
dmenuscript_parse_entry_extras
void dmenuscript_parse_entry_extras(G_GNUC_UNUSED Mode *sw, DmenuScriptEntry *entry, char *buffer, size_t length)
Definition: script.c:79
parse_ranges
void parse_ranges(char *input, rofi_range_pair **list, unsigned int *length)
Definition: helper.c:1167
script_mode_destroy
static void script_mode_destroy(Mode *sw)
Definition: script.c:335
MENU_NEXT
@ MENU_NEXT
Definition: mode.h:73
rofi_mode::_get_display_value
_mode_get_display_value _get_display_value
Definition: mode-private.h:174
script_switcher_is_valid
gboolean script_switcher_is_valid(const char *token)
Definition: script.c:465
rofi_icon_fetcher_query
uint32_t rofi_icon_fetcher_query(const char *name, const int size)
Definition: rofi-icon-fetcher.c:273
script_mode_init
static int script_mode_init(Mode *sw)
Definition: script.c:246
helper_token_match
int helper_token_match(rofi_int_matcher *const *tokens, const char *input)
Definition: helper.c:451
get_index
static unsigned int get_index(unsigned int length, int index)
Definition: script.c:353
textbox.h
rofi-icon-fetcher.h
script.h
script_token_match
static int script_token_match(const Mode *sw, rofi_int_matcher **tokens, unsigned int index)
Definition: script.c:387
ModeMode
ModeMode
Definition: mode.h:50
DmenuScriptEntry
Definition: dmenuscriptshared.h:5
RELOAD_DIALOG
@ RELOAD_DIALOG
Definition: mode.h:56
parse_header_entry
static void parse_header_entry(Mode *sw, char *line, ssize_t length)
Definition: script.c:111
ScriptModePrivateData::no_custom
gboolean no_custom
Definition: script.c:73
script_mode_reset_highlight
static void script_mode_reset_highlight(Mode *sw)
Definition: script.c:262
MENU_LOWER_MASK
@ MENU_LOWER_MASK
Definition: mode.h:85
helper.h
ScriptModePrivateData::cmd_list_length
unsigned int cmd_list_length
Definition: script.c:59
ScriptModePrivateData::num_urgent_list
unsigned int num_urgent_list
Definition: script.c:63
script_get_message
static char * script_get_message(const Mode *sw)
Definition: script.c:407
rofi_mode::_result
_mode_result _result
Definition: mode-private.h:170
rofi_mode::_get_completion
_mode_get_completion _get_completion
Definition: mode-private.h:178
rofi_mode::_get_message
_mode_get_message _get_message
Definition: mode-private.h:182
ScriptModePrivateData::cmd_list
DmenuScriptEntry * cmd_list
Definition: script.c:57
rofi_mode::_get_num_entries
__mode_get_num_entries _get_num_entries
Definition: mode-private.h:168