From 96e711bcd1c60ec4eabbfc14b5ab3c0fc49799b1 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Fri, 20 Dec 2019 11:46:15 -0500 Subject: [PATCH] pantheon.wingpanel-with-indicators: have indicators argument only append to defaults Wingpanel was designed firstly as an indicator renderer, and as such just a container for indicators that are distributed outside itself. Being able to control which and each indicator with `indicators` is confusing, ideally each of the default indicators would be shipped with wingpanel itself. I don't see how this kind of extensibility would be useful to a user so we're going to append to the expected defaults. The `useDefaultIndicators` argument is there to development test a single indicator/s. --- pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix b/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix index 253c61b77909..a46a26cc9ea5 100644 --- a/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix +++ b/pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix @@ -6,10 +6,14 @@ , wingpanelIndicators , switchboard-with-plugs , indicators ? null + # Only useful to disable for development testing. +, useDefaultIndicators ? true }: let - selectedIndicators = if indicators == null then wingpanelIndicators else indicators; + selectedIndicators = + if indicators == null then wingpanelIndicators + else indicators ++ (lib.optional useDefaultIndicators wingpanelIndicators); in symlinkJoin { name = "${wingpanel.name}-with-indicators";