mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #30364 from Ma27/compton/opacity-rules-support
services.compton: add `opacityRules` option
This commit is contained in:
commit
c6218193dd
1 changed files with 17 additions and 2 deletions
|
@ -7,7 +7,12 @@ let
|
||||||
|
|
||||||
cfg = config.services.compton;
|
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 ''
|
(optionalString cfg.fade ''
|
||||||
# fading
|
# fading
|
||||||
fading = true;
|
fading = true;
|
||||||
|
@ -30,7 +35,9 @@ let
|
||||||
active-opacity = ${cfg.activeOpacity};
|
active-opacity = ${cfg.activeOpacity};
|
||||||
inactive-opacity = ${cfg.inactiveOpacity};
|
inactive-opacity = ${cfg.inactiveOpacity};
|
||||||
menu-opacity = ${cfg.menuOpacity};
|
menu-opacity = ${cfg.menuOpacity};
|
||||||
|
|
||||||
|
${opacityRules}
|
||||||
|
|
||||||
# other options
|
# other options
|
||||||
backend = ${toJSON cfg.backend};
|
backend = ${toJSON cfg.backend};
|
||||||
vsync = ${toJSON cfg.vSync};
|
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 {
|
backend = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "glx";
|
default = "glx";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue