rofi
1.5.1
|
Go to the source code of this file.
Data Structures | |
struct | RofiHelperExecuteContext |
Functions | |
int | helper_parse_setup (char *string, char ***output, int *length,...) |
rofi_int_matcher ** | helper_tokenize (const char *input, int case_sensitive) |
void | helper_tokenize_free (rofi_int_matcher **tokens) |
int | find_arg_char (const char *const key, char *val) |
int | find_arg_uint (const char *const key, unsigned int *val) |
int | find_arg_int (const char *const key, int *val) |
int | find_arg_str (const char *const key, char **val) |
const char ** | find_arg_strv (const char *const key) |
int | find_arg (const char *const key) |
int | helper_token_match (rofi_int_matcher *const *tokens, const char *input) |
int | execute_generator (const char *cmd) __attribute__((nonnull)) |
int | create_pid_file (const char *pidfile) |
void | remove_pid_file (int fd) |
int | config_sanity_check (void) |
char | helper_parse_char (const char *arg) |
void | cmd_set_arguments (int argc, char **argv) |
char * | rofi_expand_path (const char *input) |
unsigned int | levenshtein (const char *needle, const glong needlelen, const char *haystack, const glong haystacklen) |
char * | rofi_force_utf8 (const gchar *data, ssize_t length) |
char * | rofi_latin_to_utf8_strdup (const char *input, gssize length) |
gchar * | rofi_escape_markup (gchar *text) |
int | rofi_scorer_fuzzy_evaluate (const char *pattern, glong plen, const char *str, glong slen) |
int | utf8_strncmp (const char *a, const char *b, size_t n) __attribute__((nonnull(1 |
gboolean | helper_execute (const char *wd, char **args, const char *error_precmd, const char *error_cmd, RofiHelperExecuteContext *context) |
gboolean | helper_execute_command (const char *wd, const char *cmd, gboolean run_in_term, RofiHelperExecuteContext *context) |
cairo_surface_t * | cairo_image_surface_create_from_svg (const gchar *file, int height) |
void | parse_ranges (char *input, rofi_range_pair **list, unsigned int *length) |
void | rofi_output_formatted_line (const char *format, const char *string, int selected_line, const char *filter) |
cairo_surface_t* cairo_image_surface_create_from_svg | ( | const gchar * | file, |
int | height | ||
) |
file | The file path |
height | The wanted height Gets a surface from an svg path |
Rendering fails
Definition at line 1085 of file helper.c.
References config, and Settings::dpi.
gboolean helper_execute | ( | const char * | wd, |
char ** | args, | ||
const char * | error_precmd, | ||
const char * | error_cmd, | ||
RofiHelperExecuteContext * | context | ||
) |
wd | The working directory. |
args | The arguments of the command to exec. |
error_precmd | Prefix to error message command. |
error_cmd | Error message command |
context | The startup notification context, if any |
Executes the command
Definition at line 975 of file helper.c.
References display_startup_notification(), and rofi_view_error_dialog().
Referenced by execshssh(), and helper_execute_command().
gboolean helper_execute_command | ( | const char * | wd, |
const char * | cmd, | ||
gboolean | run_in_term, | ||
RofiHelperExecuteContext * | context | ||
) |
wd | The work directory (optional) |
cmd | The cmd to execute |
run_in_term | Indicate if command should be run in a terminal |
context | The startup notification context, if any |
Execute command. If needed members of
context | are NULL, they will be filled. |
Definition at line 1000 of file helper.c.
References RofiHelperExecuteContext::binary, RofiHelperExecuteContext::command, config, RofiHelperExecuteContext::description, helper_execute(), helper_parse_setup(), RofiHelperExecuteContext::name, Settings::run_command, and Settings::run_shell_command.
Referenced by exec_cmd().
void parse_ranges | ( | char * | input, |
rofi_range_pair ** | list, | ||
unsigned int * | length | ||
) |
Ranges.
input | String to parse |
list | List of ranges |
length | Length of list. |
ranges
Definition at line 1148 of file helper.c.
References parse_pair().
Referenced by dmenu_mode_init(), and parse_header_entry().
void rofi_output_formatted_line | ( | const char * | format, |
const char * | string, | ||
int | selected_line, | ||
const char * | filter | ||
) |
format | |
string | |
selected_line | |
filter | |
format | The format string used. See below for possible syntax. |
string | The selected entry. |
selected_line | The selected line index. |
filter | The entered filter. |
Function that outputs the selected line in the user-specified format. Currently the following formats are supported:
This functions outputs the formatted string to stdout, appends a newline (
) character and calls flush on the file descriptor.
Definition at line 1182 of file helper.c.
Referenced by dmenu_print_results(), and dmenu_switcher_dialog().
int utf8_strncmp | ( | const char * | a, |
const char * | b, | ||
size_t | n | ||
) |
a | UTF-8 string to compare |
b | UTF-8 string to compare |
n | Maximum number of characters to compare |
Compares the G_NORMALIZE_ALL_COMPOSE
forms of the two strings.
n
characters (not bytes) of a
are found, respectively, to be less than, to match, or be greater than the first n
characters (not bytes) of b
.