From 4f89114ed2088d5e6cbb2986536ec0a8ebf73363 Mon Sep 17 00:00:00 2001 From: CDaut Date: Thu, 29 Feb 2024 22:48:55 +0100 Subject: [PATCH] configured picom --- home.nix | 1 + programm_configs/picom.nix | 54 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 programm_configs/picom.nix diff --git a/home.nix b/home.nix index e837123..c86e2e4 100644 --- a/home.nix +++ b/home.nix @@ -24,6 +24,7 @@ in ./programm_configs/vscode.nix ./programm_configs/rofi.nix ./programm_configs/i3.nix + ./programm_configs/picom.nix ]; # The home.packages option allows you to install Nix packages into your diff --git a/programm_configs/picom.nix b/programm_configs/picom.nix new file mode 100644 index 0000000..4dc4dd4 --- /dev/null +++ b/programm_configs/picom.nix @@ -0,0 +1,54 @@ +{ pkgs, ... }: +{ + services.picom = { + enable = true; + backend = "xrender"; + fade = true; + + # The time between steps in a fade in milliseconds. + fadeDelta = 10; + fadeSteps = [ 0.03 0.03 ]; + + # Enabled client-side shadows on windows. + shadow = true; + shadowOffsets = [ (-5) (-5) ]; + # The translucency for shadows. (default .75) + shadowOpacity = 0.5; + + vSync = true; + + inactiveOpacity = 1; + activeOpacity = 1; + + opacityRules = [ + "85:class_g = 'Alacritty' && focused" + "60:class_g = 'Alacritty' && !focused" + ]; + + settings = { + blur = { + background = true; + method = "kernel"; + kern = "7x7gaussian"; + strength = 20; + }; + detect-rounded-corners = true; + shadow-ignore-shaped = false; + }; + + + wintypes = { + tooltip = + { + # fade: Fade the particular type of windows. + fade = true; + # shadow: Give those windows shadow + shadow = false; + # opacity: Default opacity for the type of windows. + opacity = 0.85; + # focus: Whether to always consider windows of this type focused. + focus = true; + }; + }; + }; +}