diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-10-13 13:09:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-13 13:09:53 +0200 |
commit | c6218193ddc997c95f3d3ccc307e53bfe5e1cc79 (patch) | |
tree | ccf56e8bc3fa67829beab813b1705474462e0894 /nixos | |
parent | 98d5aa05cb8e7a2beb58f61fa40b22f686c616c2 (diff) | |
parent | 4b50d543bdfd93abf39ee2d5e827719627d84202 (diff) | |
download | nixlib-c6218193ddc997c95f3d3ccc307e53bfe5e1cc79.tar nixlib-c6218193ddc997c95f3d3ccc307e53bfe5e1cc79.tar.gz nixlib-c6218193ddc997c95f3d3ccc307e53bfe5e1cc79.tar.bz2 nixlib-c6218193ddc997c95f3d3ccc307e53bfe5e1cc79.tar.lz nixlib-c6218193ddc997c95f3d3ccc307e53bfe5e1cc79.tar.xz nixlib-c6218193ddc997c95f3d3ccc307e53bfe5e1cc79.tar.zst nixlib-c6218193ddc997c95f3d3ccc307e53bfe5e1cc79.zip |
Merge pull request #30364 from Ma27/compton/opacity-rules-support
services.compton: add `opacityRules` option
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/compton.nix | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/nixos/modules/services/x11/compton.nix b/nixos/modules/services/x11/compton.nix index 56bc66b71796..42ceeb819806 100644 --- a/nixos/modules/services/x11/compton.nix +++ b/nixos/modules/services/x11/compton.nix @@ -7,7 +7,12 @@ let cfg = config.services.compton; - configFile = pkgs.writeText "compton.conf" + configFile = let + opacityRules = optionalString (length cfg.opacityRules != 0) + (concatStringsSep "\n" + (map (a: "opacity-rule = [ \"${a}\" ];") cfg.opacityRules) + ); + in pkgs.writeText "compton.conf" (optionalString cfg.fade '' # fading fading = true; @@ -30,7 +35,9 @@ let active-opacity = ${cfg.activeOpacity}; inactive-opacity = ${cfg.inactiveOpacity}; menu-opacity = ${cfg.menuOpacity}; - + + ${opacityRules} + # other options backend = ${toJSON cfg.backend}; vsync = ${toJSON cfg.vSync}; @@ -155,6 +162,14 @@ in { ''; }; + opacityRules = mkOption { + type = types.listOf types.str; + default = []; + description = '' + Opacity rules to be handled by compton. + ''; + }; + backend = mkOption { type = types.str; default = "glx"; |