1 This patch adds a "guix gc" button to the low disk space notification
2 that 'gsd-housekeeping' emits.
4 diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
5 index bd3437e..89027d8 100644
6 --- a/plugins/housekeeping/gsd-disk-space.c
7 +++ b/plugins/housekeeping/gsd-disk-space.c
8 @@ -546,6 +546,21 @@ empty_trash_callback (NotifyNotification *n,
9 notify_notification_close (n, NULL);
13 +guix_gc_callback (NotifyNotification *n,
16 + const gchar *argv[] = { "guix", "gc", NULL };
18 + g_assert (action != NULL);
19 + g_assert (strcmp (action, "run-guix-gc") == 0);
21 + g_spawn_async (NULL, (gchar **) argv, NULL, G_SPAWN_SEARCH_PATH,
22 + NULL, NULL, NULL, NULL);
24 + notify_notification_close (n, NULL);
28 on_notification_closed (NotifyNotification *n)
30 @@ -591,6 +606,13 @@ ldsm_notify (const char *summary,
34 + notify_notification_add_action (notification,
36 + _("Collect Unused Guix Items"),
37 + (NotifyActionCallback) guix_gc_callback,
41 has_trash = ldsm_mount_has_trash (mount_path);