From 88e713b981c8760c255b19009918ee94f60fbdc1 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Tue, 26 Jul 2022 17:51:31 +0100 Subject: Add automatic detection of number of results. Tofi will now try to autodetect how many results can be drawn if --num-results=0 is specified, which is now the default. --- src/drun.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/drun.c') diff --git a/src/drun.c b/src/drun.c index bc755fb..8e1e0b4 100644 --- a/src/drun.c +++ b/src/drun.c @@ -122,6 +122,11 @@ static void parse_desktop_file(gpointer key, gpointer value, void *data) struct desktop_vec drun_generate(void) { + /* + * Note for the future: this custom logic could be replaced with + * g_app_info_get_all(), but that's slower. Worth remembering + * though if this runs into issues. + */ log_debug("Retrieving application dirs.\n"); struct string_vec paths = get_application_paths(); struct string_vec desktop_files = string_vec_create(); -- cgit v1.2.3