31#define G_LOG_DOMAIN "Helper"
44#include <glib/gstdio.h>
46#include <pango/pango-fontmap.h>
47#include <pango/pango.h>
48#include <pango/pangocairo.h>
62 "on focused monitor",
"on focused window",
"at mouse pointer",
63 "on monitor with focused window",
"on monitor that has mouse pointer"};
79 h = g_hash_table_new(g_str_hash, g_str_equal);
87 char *key = va_arg(ap,
char *);
88 if (key == (
char *)0) {
91 char *value = va_arg(ap,
char *);
92 if (value == (
char *)0) {
95 g_hash_table_insert(h, key, value);
101 g_hash_table_destroy(h);
103 if (g_shell_parse_argv(res, length, output, &error)) {
110 char *msg = g_strdup_printf(
"Failed to parse: '%s'\nError: '%s'",
string,
121 for (
size_t i = 0; tokens && tokens[i]; i++) {
122 g_regex_unref((GRegex *)tokens[i]->regex);
129 gchar *r = g_regex_escape_string(input, -1);
130 size_t str_l = strlen(r);
131 for (
size_t i = 0; i < str_l; i++) {
133 if (r[i + 1] ==
'*') {
135 }
else if (r[i + 1] ==
'?') {
145 GString *str = g_string_new(
"");
146 gchar *r = g_regex_escape_string(input, -1);
149 for (iter = r; iter && *iter !=
'\0'; iter = g_utf8_next_char(iter)) {
151 g_string_append(str,
"(");
153 g_string_append(str,
".*?(");
156 g_string_append_c(str,
'\\');
157 iter = g_utf8_next_char(iter);
159 if ((*iter) ==
'\0') {
163 g_string_append_unichar(str, g_utf8_get_char(iter));
164 g_string_append(str,
")");
168 retv = g_string_free(str, FALSE);
173 gchar *r = g_regex_escape_string(input, -1);
174 char *retv = g_strconcat(
"\\b", r, NULL);
186 char *s = g_utf8_normalize(os, -1, G_NORMALIZE_ALL);
187 ssize_t str_size = (g_utf8_strlen(s, -1) * 6 + 2 + 1) *
sizeof(
char);
188 char *str = g_malloc0(str_size);
190 for (
const char *iter = s; iter && *iter; iter = g_utf8_next_char(iter)) {
191 gunichar uc = g_utf8_get_char(iter);
192 if (!g_unichar_ismark(uc)) {
193 int l = g_unichar_to_utf8(uc, buf);
194 memcpy(striter, buf, l);
204static inline GRegex *
R(
const char *s,
int case_sensitive) {
208 GRegex *r = g_regex_new(
209 str, G_REGEX_OPTIMIZE | ((case_sensitive) ? 0 : G_REGEX_CASELESS), 0,
216 s, G_REGEX_OPTIMIZE | ((case_sensitive) ? 0 : G_REGEX_CASELESS), 0, NULL);
230 retv =
R(r, case_sensitive);
234 retv =
R(input, case_sensitive);
236 r = g_regex_escape_string(input, -1);
237 retv =
R(r, case_sensitive);
243 retv =
R(r, case_sensitive);
248 retv =
R(r, case_sensitive);
252 r = g_regex_escape_string(input, -1);
253 retv =
R(r, case_sensitive);
264 size_t len = strlen(input);
269 char *saveptr = NULL, *token;
281 char *str = g_strdup(input);
285 const char *
const sep =
" ";
286 for (token = strtok_r(str, sep, &saveptr); token != NULL;
287 token = strtok_r(NULL, sep, &saveptr)) {
290 retv[num_tokens + 1] = NULL;
319 const char **retv = NULL;
327 retv = g_malloc0((length + 1) *
sizeof(
char *));
341 if (val != NULL && i > 0 && i < (
stored_argc - 1)) {
350 if (val != NULL && i > 0 && i < (
stored_argc - 1)) {
358 const size_t len = strlen(arg);
364 if (len == 2 && arg[0] ==
'\\') {
397 if (len > 2 && arg[0] ==
'\\' && arg[1] ==
'x') {
398 return (
char)strtol(&arg[2], NULL, 16);
400 g_warning(
"Failed to parse character string: \"%s\"", arg);
408 if (val != NULL && i > 0 && i < (
stored_argc - 1)) {
419 PangoAttribute *pa = pango_attr_weight_new(PANGO_WEIGHT_BOLD);
420 pa->start_index = start;
422 pango_attr_list_insert(retv, pa);
424#if PANGO_VERSION_CHECK(1, 50, 0)
427 pango_attr_text_transform_new(PANGO_TEXT_TRANSFORM_UPPERCASE);
428 pa->start_index = start;
430 pango_attr_list_insert(retv, pa);
434 pango_attr_text_transform_new(PANGO_TEXT_TRANSFORM_LOWERCASE);
435 pa->start_index = start;
437 pango_attr_list_insert(retv, pa);
442 pango_attr_text_transform_new(PANGO_TEXT_TRANSFORM_CAPITALIZE);
443 pa->start_index = start;
445 pango_attr_list_insert(retv, pa);
451 PangoAttribute *pa = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE);
452 pa->start_index = start;
454 pango_attr_list_insert(retv, pa);
457 PangoAttribute *pa = pango_attr_strikethrough_new(TRUE);
458 pa->start_index = start;
460 pango_attr_list_insert(retv, pa);
463 PangoAttribute *pa = pango_attr_style_new(PANGO_STYLE_ITALIC);
464 pa->start_index = start;
466 pango_attr_list_insert(retv, pa);
469 PangoAttribute *pa = pango_attr_foreground_new(
471 pa->start_index = start;
473 pango_attr_list_insert(retv, pa);
476 pa = pango_attr_foreground_alpha_new(th.
color.
alpha * 65535);
477 pa->start_index = start;
479 pango_attr_list_insert(retv, pa);
487 PangoAttrList *retv) {
494 for (
int j = 0; tokens[j]; j++) {
495 GMatchInfo *gmi = NULL;
496 if (tokens[j]->invert) {
499 g_regex_match(tokens[j]->regex, input, G_REGEX_MATCH_PARTIAL, &gmi);
500 while (g_match_info_matches(gmi)) {
501 int count = g_match_info_get_match_count(gmi);
502 for (
int index = (
count > 1) ? 1 : 0; index <
count; index++) {
504 g_match_info_fetch_pos(gmi, index, &start, &end);
507 g_match_info_next(gmi, NULL);
509 g_match_info_free(gmi);
521 for (
int j = 0; match && tokens[j]; j++) {
522 match = g_regex_match(tokens[j]->regex, r, 0, NULL);
523 match ^= tokens[j]->invert;
527 for (
int j = 0; match && tokens[j]; j++) {
528 match = g_regex_match(tokens[j]->regex, input, 0, NULL);
529 match ^= tokens[j]->invert;
542 GError *error = NULL;
543 g_spawn_async_with_pipes(NULL, args, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
544 NULL, NULL, &fd, NULL, &error);
547 char *msg = g_strdup_printf(
"Failed to execute: '%s'\nError: '%s'", cmd,
564 int fd = g_open(
pidfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
566 g_warning(
"Failed to create pid file: '%s'.",
pidfile);
570 int flags = fcntl(fd, F_GETFD, NULL);
572 if (fcntl(fd, F_SETFD,
flags, NULL) < 0) {
573 g_warning(
"Failed to set CLOEXEC on pidfile.");
578 int retv = flock(fd, LOCK_EX | LOCK_NB);
580 g_warning(
"Failed to set lock on pidfile: Rofi already running?");
581 g_warning(
"Got error: %d %s", retv, g_strerror(errno));
586 ssize_t l = read(fd, &buffer, 63);
589 pid_t pid = g_ascii_strtoll(buffer, NULL, 0);
592 retv = flock(fd, LOCK_EX | LOCK_NB);
606 if (ftruncate(fd, (off_t)0) == 0) {
609 int length = snprintf(buffer, 64,
"%i", getpid());
612 l += write(fd, &buffer[l], length - l);
621 g_warning(
"Failed to close pidfile: '%s'", g_strerror(errno));
627 const char *fam = pango_font_description_get_family(pfd);
628 int size = pango_font_description_get_size(pfd);
629 if (fam == NULL || size == 0) {
630 g_debug(
"Pango failed to parse font: '%s'", font);
631 g_debug(
"Got family: <b>%s</b> at size: <b>%d</b>", fam ? fam :
"{unknown}",
646 int found_error = FALSE;
648 g_string_new(
"<big><b>The configuration failed to validate:</b></big>\n");
658 g_string_append_printf(
660 "\t<b>config.sorting_method</b>=%s is not a valid sorting "
661 "strategy.\nValid options are: normal or fzf.\n",
680 g_string_append_printf(msg,
681 "\t<b>config.matching</b>=%s is not a valid "
682 "matching strategy.\nValid options are: glob, "
683 "regex, fuzzy, prefix or normal.\n",
690 g_string_append_printf(msg,
691 "\t<b>config.element_height</b>=%d is invalid. An "
692 "element needs to be at least 1 line high.\n",
698 g_string_append_printf(msg,
699 "\t<b>config.location</b>=%d is invalid. Value "
700 "should be between %d and %d.\n",
711 if (name && name[0] ==
'-') {
712 int index = name[1] -
'0';
713 if (index < 5 && index > 0) {
717 g_string_append_printf(
718 msg,
"\t<b>config.monitor</b>=%s Could not find monitor.\n", name);
729 g_string_append(msg,
"Please update your configuration.");
734 g_string_free(msg, TRUE);
739 char **str = g_strsplit(input, G_DIR_SEPARATOR_S, -1);
740 for (
unsigned int i = 0; str && str[i]; i++) {
742 if (str[i][0] ==
'~' && str[i][1] ==
'\0') {
744 str[i] = g_strdup(g_get_home_dir());
747 else if (str[i][0] ==
'~') {
748 struct passwd *p = getpwnam(&(str[i][1]));
751 str[i] = g_strdup(p->pw_dir);
755 if (input[0] == G_DIR_SEPARATOR) {
756 str[i] = g_strdup_printf(
"%s%s", G_DIR_SEPARATOR_S, s);
761 char *retv = g_build_filenamev(str);
767#define MIN3(a, b, c) \
768 ((a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c)))
770unsigned int levenshtein(
const char *needle,
const glong needlelen,
771 const char *haystack,
const glong haystacklen) {
772 if (needlelen == G_MAXLONG) {
776 unsigned int column[needlelen + 1];
777 for (glong y = 0; y < needlelen; y++) {
782 column[needlelen] = needlelen;
783 for (glong x = 1; x <= haystacklen; x++) {
784 const char *needles = needle;
786 gunichar haystackc = g_utf8_get_char(haystack);
788 haystackc = g_unichar_tolower(haystackc);
790 for (glong y = 1, lastdiag = x - 1; y <= needlelen; y++) {
791 gunichar needlec = g_utf8_get_char(needles);
793 needlec = g_unichar_tolower(needlec);
795 unsigned int olddiag = column[y];
796 column[y] =
MIN3(column[y] + 1, column[y - 1] + 1,
797 lastdiag + (needlec == haystackc ? 0 : 1));
799 needles = g_utf8_next_char(needles);
801 haystack = g_utf8_next_char(haystack);
803 return column[needlelen];
808 return g_convert_with_fallback(input, length,
"UTF-8",
"latin1",
"\uFFFD",
809 NULL, &slength, NULL);
819 if (g_utf8_validate(data, length, &end)) {
820 return g_memdup2(data, length + 1);
822 string = g_string_sized_new(length + 16);
826 g_string_append_len(
string, data, end - data);
828 g_string_append(
string,
"\uFFFD");
829 length -= (end - data) + 1;
831 }
while (!g_utf8_validate(data, length, &end));
834 g_string_append_len(
string, data, length);
837 return g_string_free(
string, FALSE);
845#define FUZZY_SCORER_MAX_LENGTH 256
847#define MIN_SCORE (INT_MIN / 2)
849#define LEADING_GAP_SCORE -4
853#define WORD_START_SCORE 50
855#define NON_WORD_SCORE 40
857#define CAMEL_SCORE (WORD_START_SCORE + GAP_SCORE - 1)
859#define CONSECUTIVE_SCORE (WORD_START_SCORE + GAP_SCORE)
861#define PATTERN_NON_START_MULTIPLIER 1
863#define PATTERN_START_MULTIPLIER 2
885 if (g_unichar_islower(c)) {
888 if (g_unichar_isupper(c)) {
891 if (g_unichar_isdigit(c)) {
925 gboolean pfirst = TRUE;
927 gboolean pstart = TRUE;
929 int *score = g_malloc_n(slen,
sizeof(
int));
931 int *dp = g_malloc_n(slen,
sizeof(
int));
934 int uleft = 0, ulefts = 0, left, lefts;
935 const gchar *pit = pattern, *sit;
937 for (si = 0, sit = str; si < slen; si++, sit = g_utf8_next_char(sit)) {
943 for (pi = 0; pi < plen; pi++, pit = g_utf8_next_char(pit)) {
944 gunichar pc = g_utf8_get_char(pit), sc;
945 if (g_unichar_isspace(pc)) {
950 for (si = 0, sit = str; si < slen; si++, sit = g_utf8_next_char(sit)) {
953 sc = g_utf8_get_char(sit);
956 : g_unichar_tolower(pc) == g_unichar_tolower(sc)) {
967 pfirst = pstart = FALSE;
970 for (si = 0; si < slen; si++) {
990 char *na = g_utf8_normalize(a, -1, G_NORMALIZE_ALL_COMPOSE);
991 char *nb = g_utf8_normalize(b, -1, G_NORMALIZE_ALL_COMPOSE);
992 *g_utf8_offset_to_pointer(na, n) =
'\0';
993 *g_utf8_offset_to_pointer(nb, n) =
'\0';
994 int r = g_utf8_collate(na, nb);
1001 const char *error_cmd,
1003 gboolean retv = TRUE;
1004 GError *error = NULL;
1006 GSpawnChildSetupFunc child_setup = NULL;
1007 gpointer user_data = NULL;
1011 g_spawn_async(wd, args, NULL, G_SPAWN_SEARCH_PATH, child_setup, user_data,
1013 if (error != NULL) {
1014 char *msg = g_strdup_printf(
"Failed to execute: '%s%s'\nError: '%s'",
1015 error_precmd, error_cmd, error->message);
1019 g_error_free(error);
1029 gboolean run_in_term,
1046 if (context != NULL) {
1047 if (context->
name == NULL) {
1048 context->
name = args[0];
1050 if (context->
binary == NULL) {
1051 context->
binary = args[0];
1054 gsize l = strlen(
"Launching '' via rofi") + strlen(cmd) + 1;
1055 gchar *description = g_newa(gchar, l);
1057 g_snprintf(description, l,
"Launching '%s' via rofi", cmd);
1060 if (context->
command == NULL) {
1069 const char *parent_file) {
1072 if (g_path_is_absolute(filename)) {
1073 g_debug(
"Opening theme, path is absolute: %s", filename);
1074 if (g_file_test(filename, G_FILE_TEST_EXISTS)) {
1075 return g_strdup(filename);
1077 g_debug(
"Opening theme, path is absolute but does not exists: %s",
1080 if (parent_file != NULL) {
1082 char *basedir = g_path_get_dirname(parent_file);
1083 char *path = g_build_filename(basedir, filename, NULL);
1085 g_debug(
"Opening theme, check in dir where file is included: %s", path);
1086 if (g_file_test(path, G_FILE_TEST_EXISTS)) {
1089 g_debug(
"Opening theme, file does not exists in dir where file is "
1095 const char *cpath = g_get_user_config_dir();
1097 char *themep = g_build_filename(cpath,
"rofi",
"themes", filename, NULL);
1098 g_debug(
"Opening theme, testing: %s", themep);
1099 if (themep && g_file_test(themep, G_FILE_TEST_EXISTS)) {
1106 char *themep = g_build_filename(cpath,
"rofi", filename, NULL);
1107 g_debug(
"Opening theme, testing: %s", themep);
1108 if (g_file_test(themep, G_FILE_TEST_EXISTS)) {
1113 const char *datadir = g_get_user_data_dir();
1116 g_build_filename(datadir,
"rofi",
"themes", filename, NULL);
1118 g_debug(
"Opening theme, testing: %s", theme_path);
1119 if (g_file_test(theme_path, G_FILE_TEST_EXISTS)) {
1126 const gchar *
const *system_data_dirs = g_get_system_data_dirs();
1127 if (system_data_dirs) {
1128 for (uint_fast32_t i = 0; system_data_dirs[i] != NULL; i++) {
1129 const char *
const sdatadir = system_data_dirs[i];
1130 g_debug(
"Opening theme directory: %s", sdatadir);
1132 g_build_filename(sdatadir,
"rofi",
"themes", filename, NULL);
1134 g_debug(
"Opening theme, testing: %s", theme_path);
1135 if (g_file_test(theme_path, G_FILE_TEST_EXISTS)) {
1143 char *theme_path = g_build_filename(THEME_DIR, filename, NULL);
1145 g_debug(
"Opening theme, testing: %s", theme_path);
1146 if (g_file_test(theme_path, G_FILE_TEST_EXISTS)) {
1155 const char *parent_file) {
1158 g_debug(
"Opening theme, testing: %s\n", filename);
1159 if (g_path_is_absolute(filename)) {
1160 g_debug(
"Opening theme, path is absolute: %s", filename);
1161 if (g_file_test(filename, G_FILE_TEST_EXISTS)) {
1165 gboolean ext_found = FALSE;
1166 for (
const char **i = ext; *i != NULL; i++) {
1167 if (g_str_has_suffix(file, *i)) {
1181 g_assert_nonnull(ext[0]);
1183 char *temp = filename;
1184 for (
const char **i = ext; *i != NULL; i++) {
1185 filename = g_strconcat(temp, *i, NULL);
1201 while (input != NULL && isblank(*input)) {
1205 if (input == NULL) {
1209 const char *sep[] = {
"-",
":"};
1210 int pythonic = (strchr(input,
':') || input[0] ==
'-') ? 1 : 0;
1213 for (
char *token = strsep(&input, sep[pythonic]); token != NULL;
1214 token = strsep(&input, sep[pythonic])) {
1216 item->
start = item->
stop = (int)strtol(token, NULL, 10);
1221 if (token[0] ==
'\0') {
1226 item->
stop = (int)strtol(token, NULL, 10);
1235 if (input == NULL) {
1238 const char *
const sep =
",";
1239 for (
char *token = strtok_r(input, sep, &endp); token != NULL;
1240 token = strtok_r(NULL, sep, &endp)) {
1245 if (
parse_pair(token, &((*list)[*length]))) {
1251 int selected_line,
const char *filter) {
1252 for (
int i = 0; format && format[i]; i++) {
1253 if (format[i] ==
'i') {
1254 fprintf(stdout,
"%d", selected_line);
1255 }
else if (format[i] ==
'd') {
1256 fprintf(stdout,
"%d", (selected_line + 1));
1257 }
else if (format[i] ==
's') {
1258 fputs(
string, stdout);
1259 }
else if (format[i] ==
'p') {
1261 pango_parse_markup(
string, -1, 0, NULL, &esc, NULL, NULL);
1266 fputs(
"invalid string", stdout);
1268 }
else if (format[i] ==
'q') {
1269 char *quote = g_shell_quote(
string);
1270 fputs(quote, stdout);
1272 }
else if (format[i] ==
'f') {
1274 fputs(filter, stdout);
1276 }
else if (format[i] ==
'F') {
1278 char *quote = g_shell_quote(filter);
1279 fputs(quote, stdout);
1283 fputc(format[i], stdout);
1286 fputc(
'\n', stdout);
1294 int num_match = g_match_info_get_match_count(info);
1296 if (num_match == 5) {
1297 match = g_match_info_fetch(info, 4);
1298 if (match != NULL) {
1300 gchar *r = g_hash_table_lookup((GHashTable *)data, match);
1303 g_string_append(res, r);
1310 else if (num_match == 4) {
1311 match = g_match_info_fetch(info, 2);
1312 if (match != NULL) {
1314 gchar *r = g_hash_table_lookup((GHashTable *)data, match);
1317 gchar *prefix = g_match_info_fetch(info, 1);
1318 g_string_append(res, prefix);
1321 g_string_append(res, r);
1323 gchar *post = g_match_info_fetch(info, 3);
1324 g_string_append(res, post);
1338 h = g_hash_table_new(g_str_hash, g_str_equal);
1340 va_start(ap,
string);
1343 char *key = va_arg(ap,
char *);
1344 if (key == (
char *)0) {
1347 char *value = va_arg(ap,
char *);
1348 g_hash_table_insert(h, key, value);
1353 g_hash_table_destroy(h);
1372 GError *error = NULL;
1376 GRegex *reg = g_regex_new(
"\\[(.*)({[-\\w]+})(.*)\\]|({[\\w-]+})",
1377 G_REGEX_UNGREEDY, 0, &error);
1378 if (error == NULL) {
1380 g_regex_replace_eval(reg,
string, -1, 0, 0,
helper_eval_cb2, h, &error);
1385 if (error != NULL) {
1386 char *msg = g_strdup_printf(
"Failed to parse: '%s'\nError: '%s'",
string,
1391 g_error_free(error);
void helper_token_match_set_pango_attr_on_style(PangoAttrList *retv, int start, int end, RofiHighlightColorStyle th)
PangoAttrList * helper_token_match_get_pango_attr(RofiHighlightColorStyle th, rofi_int_matcher **tokens, const char *input, PangoAttrList *retv)
gboolean helper_validate_font(PangoFontDescription *pfd, const char *font)
char * rofi_latin_to_utf8_strdup(const char *input, gssize length)
void parse_ranges(char *input, rofi_range_pair **list, unsigned int *length)
void cmd_set_arguments(int argc, char **argv)
rofi_int_matcher ** helper_tokenize(const char *input, int case_sensitive)
int find_arg_char(const char *const key, char *val)
gboolean helper_execute_command(const char *wd, const char *cmd, gboolean run_in_term, RofiHelperExecuteContext *context)
void helper_tokenize_free(rofi_int_matcher **tokens)
char helper_parse_char(const char *arg)
void rofi_output_formatted_line(const char *format, const char *string, int selected_line, const char *filter)
gboolean helper_execute(const char *wd, char **args, const char *error_precmd, const char *error_cmd, RofiHelperExecuteContext *context)
unsigned int levenshtein(const char *needle, const glong needlelen, const char *haystack, const glong haystacklen)
char * helper_string_replace_if_exists(char *string,...)
const char ** find_arg_strv(const char *const key)
int helper_parse_setup(char *string, char ***output, int *length,...)
int execute_generator(const char *cmd)
int find_arg_int(const char *const key, int *val)
char * rofi_expand_path(const char *input)
void remove_pid_file(int fd)
int rofi_scorer_fuzzy_evaluate(const char *pattern, glong plen, const char *str, glong slen)
int find_arg_str(const char *const key, char **val)
int find_arg_uint(const char *const key, unsigned int *val)
int find_arg(const char *const key)
int helper_token_match(rofi_int_matcher *const *tokens, const char *input)
int create_pid_file(const char *pidfile, gboolean kill_running)
int config_sanity_check(void)
char * rofi_force_utf8(const gchar *data, ssize_t length)
void rofi_add_error_message(GString *str)
int rofi_view_error_dialog(const char *msg, int markup)
#define CONSECUTIVE_SCORE
#define LEADING_GAP_SCORE
static gchar * prefix_regex(const char *input)
static char * utf8_helper_simplify_string(const char *os)
static gchar * glob_to_regex(const char *input)
const char *const monitor_position_entries[]
static enum CharClass rofi_scorer_get_character_class(gunichar c)
int utf8_strncmp(const char *a, const char *b, size_t n)
#define PATTERN_NON_START_MULTIPLIER
char * helper_string_replace_if_exists_v(char *string, GHashTable *h)
static char * helper_get_theme_path_check_file(const char *filename, const char *parent_file)
#define FUZZY_SCORER_MAX_LENGTH
static gboolean helper_eval_cb2(const GMatchInfo *info, GString *res, gpointer data)
#define PATTERN_START_MULTIPLIER
char * helper_get_theme_path(const char *file, const char **ext, const char *parent_file)
static rofi_int_matcher * create_regex(const char *input, int case_sensitive)
static GRegex * R(const char *s, int case_sensitive)
static gchar * fuzzy_to_regex(const char *input)
static gboolean parse_pair(char *input, rofi_range_pair *item)
static int rofi_scorer_get_score_for(enum CharClass prev, enum CharClass curr)
const gchar * description
MatchingMethod matching_method
unsigned int case_sensitive
char matching_negate_char
SortingMethod sorting_method_enum
int monitor_active(workarea *mon)
void display_startup_notification(RofiHelperExecuteContext *context, GSpawnChildSetupFunc *child_setup, gpointer *user_data)