rofi 2.1.0
Main

Macros

#define color_reset   "\033[0m"
#define color_bold   "\033[1m"
#define color_italic   "\033[2m"
#define color_green   "\033[0;32m"
#define color_red   "\033[0;31m"
#define ERROR_MSG(a)
#define ERROR_MSG_MARKUP   TRUE

Functions

unsigned int rofi_get_num_enabled_modes (void)
const Mode * rofi_get_mode (unsigned int index)
int mode_lookup (const char *name)
void rofi_add_error_message (GString *str)
void rofi_clear_error_messages (void)
void rofi_add_warning_message (GString *str)
void rofi_clear_warning_messages (void)
void rofi_set_return_code (int code)
void rofi_quit_main_loop (void)
Mode * rofi_collect_modes_search (const char *name)
const Mode * rofi_get_completer (void)

Variables

const char * cache_dir

Detailed Description

Macro Definition Documentation

◆ color_bold

◆ color_green

#define color_green   "\033[0;32m"

◆ color_italic

#define color_italic   "\033[2m"

◆ color_red

#define color_red   "\033[0;31m"

Set terminal foreground text red

Definition at line 131 of file rofi.h.

Referenced by help(), help_print_disabled_mode(), and print_list_of_modes().

◆ color_reset

◆ ERROR_MSG

#define ERROR_MSG ( a)
Value:
a "\n" \
"If you suspect this is caused by a bug in rofi,\n" \
"please report the following information to rofi's github page:\n" \
" * The generated commandline output when the error occurred.\n" \
" * Output of -dump-xresource\n" \
" * Steps to reproduce\n" \
" * The version of rofi you are running\n\n" \
" <i>https://github.com/davatorium/rofi/</i>"

Appends instructions on how to report an error.

Definition at line 134 of file rofi.h.

◆ ERROR_MSG_MARKUP

#define ERROR_MSG_MARKUP   TRUE

Indicates if ERROR_MSG uses pango markup

Definition at line 144 of file rofi.h.

Referenced by help_print_no_arguments(), run_mode_index(), and show_error_dialog().

Function Documentation

◆ mode_lookup()

int mode_lookup ( const char * name)
Parameters
nameName of the mode to lookup.

Find the index of the mode with name.

Returns
index of the mode in modes, -1 if not found.

Definition at line 161 of file rofi.c.

References mode_get_name(), mode_lookup(), modes, and num_modes.

Referenced by mode_lookup(), script_switch_mode(), and startup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_add_error_message()

void rofi_add_error_message ( GString * str)
Parameters
strA GString with an error message to display.

Queue an error.

Definition at line 97 of file rofi.c.

References list_of_error_msgs, and rofi_add_error_message().

Referenced by config_sanity_check(), help_print_mode_not_found(), parse_keys_abe(), rofi_add_error_message(), and yyerror().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_add_warning_message()

void rofi_add_warning_message ( GString * str)
Parameters
strA GString with an warning message to display.

Queue an warning.

Definition at line 110 of file rofi.c.

References list_of_warning_msgs, and rofi_add_warning_message().

Referenced by rofi_add_warning_message(), and rofi_theme_parse_process_links_int().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_clear_error_messages()

void rofi_clear_error_messages ( void )

Clear the list of stored error messages.

Definition at line 100 of file rofi.c.

References list_of_error_msgs, and rofi_clear_error_messages().

Referenced by cleanup(), config_parse_cmd_options(), parse_header_entry(), and rofi_clear_error_messages().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_clear_warning_messages()

void rofi_clear_warning_messages ( void )

Clear the list of stored warning messages.

Definition at line 113 of file rofi.c.

References list_of_warning_msgs, and rofi_clear_warning_messages().

Referenced by cleanup(), and rofi_clear_warning_messages().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_collect_modes_search()

Mode * rofi_collect_modes_search ( const char * name)
Parameters
nameSearch for mode with this name.
Returns
returns Mode * when found, NULL if not.

Collected modes

Definition at line 648 of file rofi.c.

References available_modes, mode_get_name(), num_available_modes, and rofi_collect_modes_search().

Referenced by add_mode(), combi_mode_parse_switchers(), rofi_collect_modes_search(), and rofi_collectmodes_add().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_get_completer()

const Mode * rofi_get_completer ( void )

Query the configure file completer.

Returns
the Mode that can be used for file completion or NULL when not found.

Definition at line 1414 of file rofi.c.

References Settings::completer_mode, config, mode_available_lookup(), and rofi_get_completer().

Referenced by rofi_get_completer(), and run_mode_result().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_get_mode()

const Mode * rofi_get_mode ( unsigned int index)
Parameters
indexThe mode to return. (should be smaller then rofi_get_num_enabled_mode)

Get an enabled mode handle.

Returns
a Mode handle.

Definition at line 159 of file rofi.c.

References modes, and rofi_get_mode().

Referenced by rofi_get_mode(), rofi_view_add_widget(), and rofi_view_switch_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_get_num_enabled_modes()

unsigned int rofi_get_num_enabled_modes ( void )

Get the number of enabled modes.

Returns
the number of enabled modes.

Definition at line 157 of file rofi.c.

References num_modes, and rofi_get_num_enabled_modes().

Referenced by rofi_get_num_enabled_modes(), and rofi_view_add_widget().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_quit_main_loop()

void rofi_quit_main_loop ( void )

Quit rofi mainloop. This will exit program.

Definition at line 833 of file rofi.c.

References main_loop, and rofi_quit_main_loop().

Referenced by rofi_quit_main_loop(), rofi_view_maybe_update(), and take_screenshot_quit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rofi_set_return_code()

void rofi_set_return_code ( int code)
Parameters
codethe code to return

Return value are used for integrating dmenu rofi in scripts. This function sets the code that rofi will return on exit.

Definition at line 155 of file rofi.c.

References return_code, and rofi_set_return_code().

Referenced by dmenu_finish(), file_browser_mode_result(), help_print_no_arguments(), recursive_browser_mode_init_config(), recursive_browser_mode_result(), rofi_set_return_code(), show_error_dialog(), and startup().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cache_dir

const char* cache_dir
extern