summaryrefslogtreecommitdiff
path: root/src/drun.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-07-26 17:51:31 +0100
committerPhil Jones <philj56@gmail.com>2022-07-26 17:51:31 +0100
commit88e713b981c8760c255b19009918ee94f60fbdc1 (patch)
treeecdca68c12425bbec7fb2f353d28a03c4e2f5a5c /src/drun.c
parentd3bf3b017b8129ff772ad9c5658ccdfc826d0e51 (diff)
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.
Diffstat (limited to 'src/drun.c')
-rw-r--r--src/drun.c5
1 files changed, 5 insertions, 0 deletions
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();