summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2023-10-31 13:24:37 +0100
committerDave Davenport <qball@blame.services>2023-10-31 13:24:37 +0100
commit3c87321258955737a5549b47a13181f747f2cf3a (patch)
treeb5ec2a8bcf0b7b2fe3dd26795953ce66cbd02e7d
parent1481030947b31f916757ec9874bcd0ce8fe24eb8 (diff)
[DRun] Allow url field to be searched and fix c/p error
Issue: #1914
-rw-r--r--source/modes/drun.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/modes/drun.c b/source/modes/drun.c
index 0bbb8333..b05ce48e 100644
--- a/source/modes/drun.c
+++ b/source/modes/drun.c
@@ -697,7 +697,7 @@ static void read_desktop_file(DRunModePrivateData *pd, const char *root,
pd->entry_list[pd->cmd_list_length].url =
g_key_file_get_locale_string(kf, DRUN_GROUP_NAME, "URL", NULL, NULL);
} else {
- pd->entry_list[pd->cmd_list_length].comment = NULL;
+ pd->entry_list[pd->cmd_list_length].url = NULL;
}
pd->entry_list[pd->cmd_list_length].icon_name =
g_key_file_get_locale_string(kf, DRUN_GROUP_NAME, "Icon", NULL, NULL);
@@ -1456,6 +1456,13 @@ static int drun_token_match(const Mode *data, rofi_int_matcher **tokens,
}
}
}
+ if (matching_entry_fields[DRUN_MATCH_FIELD_URL].enabled_match) {
+
+ // Match executable name.
+ if (test == tokens[j]->invert && rmpd->entry_list[index].url) {
+ test = helper_token_match(ftokens, rmpd->entry_list[index].url);
+ }
+ }
if (matching_entry_fields[DRUN_MATCH_FIELD_COMMENT].enabled_match) {
// Match executable name.