From 8ff7d934b2dc83aa3c37b9846f515691ff5e1fce Mon Sep 17 00:00:00 2001 From: Anton Plotnikov Date: Sun, 15 Apr 2018 05:19:37 +0300 Subject: [PATCH] Add blur options to compton --- modules/services/compton.nix | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/modules/services/compton.nix b/modules/services/compton.nix index d4ac549c..b6e85f04 100644 --- a/modules/services/compton.nix +++ b/modules/services/compton.nix @@ -24,7 +24,15 @@ let shadow-offset-y = ${toString (elemAt cfg.shadowOffsets 1)}; shadow-opacity = ${cfg.shadowOpacity}; shadow-exclude = ${toJSON cfg.shadowExclude}; + '' + + optionalString cfg.blur '' + + # blur + blur-background = true; + blur-background-exclude = ${toJSON cfg.blurExclude}; + no-dock-blur = ${toString cfg.noDockBlur}; '' + '' + # opacity active-opacity = ${cfg.activeOpacity}; inactive-opacity = ${cfg.inactiveOpacity}; @@ -42,6 +50,35 @@ in { options.services.compton = { enable = mkEnableOption "Compton X11 compositor"; + blur = mkOption { + type = types.bool; + default = false; + description = '' + Enable background blur on transparent windows. + ''; + }; + + noDockBlur = mkOption { + type = types.bool; + default = false; + description = '' + Avoid blur on docks. + ''; + }; + + blurExclude = mkOption { + type = types.listOf types.str; + default = []; + example = [ + "class_g = 'slop'" + "class_i = 'polybar'" + ]; + description = '' + List of windows to exclude background blur. + See compton(1) man page for more examples. + ''; + }; + fade = mkOption { type = types.bool; default = false;