dotfiles/nix/configs/picom.nix
2024-07-31 07:17:52 +02:00

112 lines
2.8 KiB
Nix
Executable file

{ pkgs, ... }: {
home-manager.users.grape.services.picom = {
enable = true;
backend = "glx";
vSync = false; # disable vsync to reduce input delay
extraArgs = [ "-b" "--experimental-backends" ]; # enable deamon mode and experimental backends for blur
# idk what package is missing by 24.05 so i included all of them
package =
(pkgs.picom.overrideAttrs (oldAttrs: rec {
src = pkgs.fetchFromGitHub {
owner = "pijulius";
repo = "picom";
rev = "da21aa8ef70f9796bc8609fb495c3a1e02df93f9";
hash = "sha256-rxGWAot+6FnXKjNZkMl1uHHHEMVSxm36G3VoV1vSXLA=";
};
buildInputs = with pkgs; [
dbus
libconfig
libdrm
libev
libGL
xorg.libX11
xorg.libxcb
libxdg_basedir
xorg.libXext
xorg.libXinerama
libxml2
libxslt
pcre
pixman
xorg.xcbutilimage
xorg.xcbutilrenderutil
xorg.xorgproto
];
nativeBuildInputs = with pkgs; [
asciidoc
docbook_xml_dtd_45
docbook_xsl
makeWrapper
meson
ninja
pkg-config
uthash
];
}));
settings = {
blur-method = "dual_kawase";
blur-size = 12;
blur-strength = 5;
blur-background = true;
blur-kern = "3x3box";
blur-background-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
"_GTK_FRAME_EXTENTS@:c"
"class_g ~= 'slop'"
"class_g ~= 'Peek'"
];
opacity-rule = [
"80:class_g *= 'st'"
"80:class_g *= 'kitty'"
"80:class_g *= 'alacritty'"
"80:class_g *= 'Alacritty'"
"90:class_g *= 'jamesdsp'"
"90:class_g *= 'polybar'"
"80:class_g *= 'codium'"
"80:class_g *= 'rofi'"
"80:class_g *= 'lutris'"
"80:class_g *= 'Mumble'"
"80:class_g *= 'Feishin'"
"80:class_g *= 'feishin'"
"80:class_g *= 'Element'"
"85:class_g *= 'Logseq'"
"85:class_g *= 'Codium'"
];
# rounding
corner-radius = 15;
use-damage = false;
inactive-opacity = 1.0;
frame-opacity = 1.0;
inactive-opacity-override = false;
fading = true;
fade-in-step = 0.03;
fade-out-step = 0.03;
animations = true;
animation-for-open-window = "squeeze";
animation-for-transient-window = "zoom";
animation-for-unmap-window = "squeeze";
animation-for-workspace-switch-in = "zoom";
animation-for-workspace-switch-out = "auto";
animation-stiffness = 500;
animation-dampening = 40;
animation-window-mass = 1;
animation-delta = 7;
animation-force-steps = true;
};
};
}