nix-community/plasma-manager

Specifying plasmusicToolbar without any conf installs Plasma 5 version

KucharczykL opened this issue · 3 comments

Hello, I have added plasmusicToolbar to my Plasma 6 panel based on the example in https://github.com/nix-community/plasma-manager/blob/trunk/examples/home.nix#L169.
If I don't specify any config for it, it installs the Plasma 5 version on Plasma 6 and doesn't work.
If I add config (as in the example) or if I specify it as "plasmusic-toolbar", it also works.

WORKS

panels = [
  {
    location = "bottom";
      "org.kde.plasma.panelspacer"
      {
        "plasmusicToolbar" = {
          panelIcon = {
            albumCover = {
              useAsIcon = true;
            };
          };
        };
      }
      "org.kde.plasma.marginsseparator"
      "org.kde.plasma.systemtray"
      "org.kde.plasma.digitalclock"
      "org.kde.plasma.showdesktop"
    ];
  }
];

DOESN'T WORK, no error displayed when doing home-manager switch

panels = [
  {
    location = "bottom";
      "org.kde.plasma.panelspacer"
      "plasmusicToolbar"
      "org.kde.plasma.marginsseparator"
      "org.kde.plasma.systemtray"
      "org.kde.plasma.digitalclock"
      "org.kde.plasma.showdesktop"
    ];
  }
];

WORKS, but cannot add config

panels = [
  {
    location = "bottom";
      "org.kde.plasma.panelspacer"
      "plasmusic-toolbar"
      "org.kde.plasma.marginsseparator"
      "org.kde.plasma.systemtray"
      "org.kde.plasma.digitalclock"
      "org.kde.plasma.showdesktop"
    ];
  }
];

It doesn't install the plasma 5 version. It doesn't install the package.

It is because if the specified widget is a simple string, it is converted is converted into:

{
  name = "plasmusicToolbar";
  config = {}
}

And for setting widgets, we need to set the correct widget id in name. That is why "plasmusic-toolbar" works, and "plasmusicToolbar" doesn't

If you want to use without setting any configuration using the widget-specific options, you can just use

{
  plasmusicToolbar = {};
}

I assume this is about me not fully understanding the behind-the-scenes details and not an actual bug, then 🙂 Thanks!