aboutsummaryrefslogtreecommitdiff
path: root/modules/services/compton.nix
diff options
context:
space:
mode:
authorAnton Plotnikov <plotnikovanton@gmail.com>2018-04-15 05:19:37 +0300
committerNikita Uvarov <uv.nikita@gmail.com>2018-04-16 08:50:28 +0200
commit8ff7d934b2dc83aa3c37b9846f515691ff5e1fce (patch)
treebaf3ebdc49628d5b820f7012212f83aa2b9ea580 /modules/services/compton.nix
parent5bdebf5ab045a07450f64e18f4c19c416a6611e1 (diff)
Add blur options to compton
Diffstat (limited to 'modules/services/compton.nix')
-rw-r--r--modules/services/compton.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/services/compton.nix b/modules/services/compton.nix
index d4ac549c902..b6e85f041a5 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 <literal>compton(1)</literal> man page for more examples.
+ '';
+ };
+
fade = mkOption {
type = types.bool;
default = false;