mirror of
https://github.com/nix-community/plasma-manager.git
synced 2024-08-16 21:30:49 +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:
|
} @ args:
|
||||||
let
|
let
|
||||||
cfg = config.programs.plasma;
|
cfg = config.programs.plasma;
|
||||||
|
hasWidget = widgetName: builtins.any (panel: builtins.any (widget: widget.name == widgetName) panel.widgets) cfg.panels;
|
||||||
|
|
||||||
widgets = import ./widgets args;
|
widgets = import ./widgets args;
|
||||||
|
|
||||||
@ -145,7 +146,7 @@ in
|
|||||||
# these should run at the same time.
|
# these should run at the same time.
|
||||||
config = (lib.mkIf cfg.enable {
|
config = (lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; []
|
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
|
programs.plasma.startup.desktopScript."panels_and_wallpaper" = (lib.mkIf anyPanelOrWallpaperSet
|
||||||
(
|
(
|
||||||
|
Loading…
Reference in New Issue
Block a user