From 5bdebf5ab045a07450f64e18f4c19c416a6611e1 Mon Sep 17 00:00:00 2001 From: Anton Plotnikov Date: Sun, 15 Apr 2018 05:06:44 +0300 Subject: [PATCH] Add opacity-rules to compton --- modules/services/compton.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/services/compton.nix b/modules/services/compton.nix index 54a29dc2..d4ac549c 100644 --- a/modules/services/compton.nix +++ b/modules/services/compton.nix @@ -29,6 +29,7 @@ let active-opacity = ${cfg.activeOpacity}; inactive-opacity = ${cfg.inactiveOpacity}; menu-opacity = ${cfg.menuOpacity}; + opacity-rule = ${toJSON cfg.opacityRule}; # other options backend = ${toJSON cfg.backend}; @@ -148,6 +149,19 @@ in { ''; }; + opacityRule = mkOption { + type = types.listOf types.str; + default = []; + example = [ + "87:class_i ?= 'scratchpad'" + "91:class_i ?= 'xterm'" + ]; + description = '' + List of opacity rules. + See compton(1) man page for more examples. + ''; + }; + backend = mkOption { type = types.str; default = "glx";