Merge pull request #30364 from Ma27/compton/opacity-rules-support

services.compton: add `opacityRules` option

authored by Franz Pletz and committed by GitHub c6218193 98d5aa05

+17 -2
+17 -2
nixos/modules/services/x11/compton.nix
··· 7 7 8 8 cfg = config.services.compton; 9 9 10 - configFile = pkgs.writeText "compton.conf" 10 + configFile = let 11 + opacityRules = optionalString (length cfg.opacityRules != 0) 12 + (concatStringsSep "\n" 13 + (map (a: "opacity-rule = [ \"${a}\" ];") cfg.opacityRules) 14 + ); 15 + in pkgs.writeText "compton.conf" 11 16 (optionalString cfg.fade '' 12 17 # fading 13 18 fading = true; ··· 30 35 active-opacity = ${cfg.activeOpacity}; 31 36 inactive-opacity = ${cfg.inactiveOpacity}; 32 37 menu-opacity = ${cfg.menuOpacity}; 33 - 38 + 39 + ${opacityRules} 40 + 34 41 # other options 35 42 backend = ${toJSON cfg.backend}; 36 43 vsync = ${toJSON cfg.vSync}; ··· 152 159 example = "0.8"; 153 160 description = '' 154 161 Opacity of dropdown and popup menu. 162 + ''; 163 + }; 164 + 165 + opacityRules = mkOption { 166 + type = types.listOf types.str; 167 + default = []; 168 + description = '' 169 + Opacity rules to be handled by compton. 155 170 ''; 156 171 }; 157 172