mirror of
https://github.com/pjones/plasma-manager.git
synced 2024-10-03 18:57:24 +03:00
Automatically install third-party widget if it is present in a panel (#236)
This commit is contained in:
parent
121424d140
commit
16012b09e4
@ -5,6 +5,7 @@
|
||||
} @ args:
|
||||
let
|
||||
cfg = config.programs.plasma;
|
||||
hasWidget = widgetName: builtins.any (panel: builtins.any (widget: widget.name == widgetName) panel.widgets) cfg.panels;
|
||||
|
||||
widgets = import ./widgets args;
|
||||
|
||||
@ -145,7 +146,7 @@ in
|
||||
# these should run at the same time.
|
||||
config = (lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; []
|
||||
++ lib.optionals (lib.elem "application-title-bar" cfg.extraWidgets) [ application-title-bar ];
|
||||
++ lib.optionals (lib.elem "application-title-bar" cfg.extraWidgets || hasWidget "com.github.antroids.application-title-bar") [ application-title-bar ];
|
||||
|
||||
programs.plasma.startup.desktopScript."panels_and_wallpaper" = (lib.mkIf anyPanelOrWallpaperSet
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user