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.
This commit is contained in:
worldofpeace 2019-12-20 11:46:15 -05:00
parent 4ed65a891c
commit 96e711bcd1

View file

@ -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";