From 42d273798b72ab517413738c323164382d74b3d3 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Tue, 17 Nov 2026 00:12:08 -0500 Subject: [PATCH] Reload icons when apps change GTK caches the icon theme and never rescans its directories, so newly installed apps showed up without their icons. --- grid.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/grid.js b/grid.js index 075a21f..83156cb 100644 --- a/grid.js +++ b/grid.js @@ -253,7 +253,13 @@ app.connect("activate", () => { fillPages() appInfoMonitor = Gio.AppInfoMonitor.get() - appInfoMonitor.connect("changed", fillPages) + appInfoMonitor.connect("changed", () => { + // GTK never rescans icon directories by itself, so new apps' icons wouldn't be found. + // Setting the search path, even to the same one, makes it reload. + const iconTheme = Gtk.IconTheme.get_for_display(win.get_display()) + iconTheme.set_search_path(iconTheme.get_search_path()) + fillPages() + }) const box = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL }) box.append(carousel)