rofi 1.7.5
Script
Collaboration diagram for Script:

Functions

Modescript_mode_parse_setup (const char *str)
 
gboolean script_mode_is_valid (const char *token)
 
void script_mode_gather_user_scripts (void)
 
void script_mode_cleanup (void)
 
void script_user_list (gboolean is_term)
 

Detailed Description

Function Documentation

◆ script_mode_cleanup()

void script_mode_cleanup ( void )

Cleanup memory allocated by script_mode_gather_user_scripts

Definition at line 474 of file script.c.

References num_scripts, and user_scripts.

Referenced by cleanup().

Here is the caller graph for this function:

◆ script_mode_gather_user_scripts()

void script_mode_gather_user_scripts ( void )

Gather the users scripts from ~/.config/rofi/scripts/

Definition at line 481 of file script.c.

References ScriptUser::name, num_scripts, ScriptUser::path, and user_scripts.

Referenced by rofi_collect_modes().

Here is the caller graph for this function:

◆ script_mode_is_valid()

gboolean script_mode_is_valid ( const char * token)
Parameters
tokenThe modes str to check

Check if token could be a valid script modes.

Returns
true when valid.

Definition at line 574 of file script.c.

References script_mode_has_user_script().

Referenced by add_mode().

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

◆ script_mode_parse_setup()

Mode * script_mode_parse_setup ( const char * str)
Parameters
strThe input string to parse

Parse an argument string into the right ScriptOptions data object. This is off format: <Name>:<Script>

Returns
NULL when it fails, a newly allocated ScriptOptions when successful.

Definition at line 519 of file script.c.

References rofi_mode::_destroy, rofi_mode::_get_completion, _get_display_value(), rofi_mode::_get_display_value, rofi_mode::_get_icon, rofi_mode::_get_message, rofi_mode::_get_num_entries, rofi_mode::_init, rofi_mode::_preprocess_input, rofi_mode::_result, rofi_mode::_token_match, rofi_mode::ed, rofi_mode::free, rofi_mode::name, rofi_expand_path(), script_get_icon(), script_get_message(), script_mode_destroy(), script_mode_get_num_entries(), script_mode_has_user_script(), script_mode_init(), script_mode_result(), script_switcher_free(), script_token_match(), and user_scripts.

Referenced by add_mode(), and combi_mode_parse_switchers().

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

◆ script_user_list()

void script_user_list ( gboolean is_term)
Parameters
is_termif printed to terminal

List the user scripts found.

Definition at line 581 of file script.c.

References color_bold, color_reset, ScriptUser::name, num_scripts, ScriptUser::path, and user_scripts.

Referenced by help().

Here is the caller graph for this function: