picom: use @include directive for config composition
picom doesn't support multiple --config flags. Use a wrapper config with libconfig @include directive to merge the base config and animations config. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -140,6 +140,7 @@ makeEnable config "myModules.xmonad" true {
|
||||
|
||||
# Spring physics animations config - written separately because home-manager
|
||||
# generates [] (arrays) but picom needs () (lists) for animations
|
||||
# Use @include directive in main config to include this
|
||||
xdg.configFile."picom/animations.conf".text = ''
|
||||
# Spring physics animations (mainline picom with spring-physics branch)
|
||||
# Syntax: spring(stiffness, dampening, mass) or spring(stiffness, dampening, mass, clamping)
|
||||
@@ -205,10 +206,18 @@ makeEnable config "myModules.xmonad" true {
|
||||
);
|
||||
'';
|
||||
|
||||
# Override picom service to include animations config
|
||||
# Use %h for home directory since XDG_CONFIG_HOME may not be set
|
||||
# Wrapper config that includes both home-manager generated config and animations
|
||||
# This works around picom not supporting multiple --config flags
|
||||
xdg.configFile."picom/picom-with-animations.conf".text = ''
|
||||
# Include home-manager generated base config
|
||||
@include "picom.conf"
|
||||
# Include spring physics animations (uses () list syntax)
|
||||
@include "animations.conf"
|
||||
'';
|
||||
|
||||
# Override picom service to use our wrapper config
|
||||
systemd.user.services.picom = {
|
||||
Service.ExecStart = pkgs.lib.mkForce "${pkgs.picom}/bin/picom --config %h/.config/picom/picom.conf --config %h/.config/picom/animations.conf";
|
||||
Service.ExecStart = pkgs.lib.mkForce "${pkgs.picom}/bin/picom --config %h/.config/picom/picom-with-animations.conf";
|
||||
};
|
||||
|
||||
# systemd.user.services.notifications-tray-icon = {
|
||||
|
||||
Reference in New Issue
Block a user