rofi 1.7.5
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 Moderofi_get_mode (unsigned int index)
 
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)
 
Moderofi_collect_modes_search (const char *name)
 

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 115 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 118 of file rofi.h.

◆ ERROR_MSG_MARKUP

#define ERROR_MSG_MARKUP   TRUE

Indicates if ERROR_MSG uses pango markup

Definition at line 128 of file rofi.h.

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

Function Documentation

◆ 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 90 of file rofi.c.

References list_of_error_msgs.

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

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 103 of file rofi.c.

References list_of_warning_msgs.

Referenced by rofi_theme_parse_process_links_int().

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 93 of file rofi.c.

References list_of_error_msgs.

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

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 106 of file rofi.c.

References list_of_warning_msgs.

Referenced by cleanup().

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 516 of file rofi.c.

References available_modes, and num_available_modes.

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

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 149 of file rofi.c.

References modes.

Referenced by rofi_view_add_widget(), and rofi_view_switch_mode().

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 147 of file rofi.c.

References num_modes.

Referenced by rofi_view_add_widget().

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 691 of file rofi.c.

References main_loop.

Referenced by rofi_view_maybe_update().

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 145 of file rofi.c.

References return_code.

Referenced by dmenu_finish(), help_print_no_arguments(), show_error_dialog(), and startup().

Here is the caller graph for this function:

Variable Documentation

◆ cache_dir

const char* cache_dir
extern

Pointer to xdg cache directory.

Location of Cache directory.

Definition at line 83 of file rofi.c.

Referenced by delete_entry(), delete_ssh(), exec_cmd(), exec_ssh(), file_browser_mode_init_current_dir(), file_browser_mode_result(), get_apps(), get_ssh(), and main().