2023-11-26 21:26:49 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2023-02-13 12:54:21 +01:00
|
|
|
cfg = config.jade.desktop.compositing;
|
2023-11-26 21:26:49 +01:00
|
|
|
in
|
|
|
|
with lib; {
|
|
|
|
options.jade.desktop.compositing = {
|
|
|
|
enable = mkEnableOption "Enable compositing with picom";
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.picom = {
|
2023-02-13 12:54:21 +01:00
|
|
|
enable = true;
|
|
|
|
backend = "glx";
|
|
|
|
|
|
|
|
shadow = true;
|
2023-11-26 21:26:49 +01:00
|
|
|
shadowOffsets = [(-40) (-30)];
|
2023-02-13 12:54:21 +01:00
|
|
|
shadowOpacity = 0.2;
|
|
|
|
shadowExclude = [
|
|
|
|
"class_g ?= 'Notify-osd'"
|
|
|
|
"_GTK_FRAME_EXTENTS@:c"
|
2023-09-09 01:10:22 +02:00
|
|
|
"!(class_g = 'Rofi' || class_g = 'Dunst')"
|
2023-02-13 12:54:21 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
vSync = true;
|
|
|
|
settings = {
|
|
|
|
"shadow-radius" = 40;
|
|
|
|
# fading rofi
|
|
|
|
"fading" = true;
|
|
|
|
"fade-in-step" = 0.25;
|
|
|
|
"fade-out-step" = 0.2;
|
|
|
|
"fade-delta" = 20;
|
2023-11-26 21:26:49 +01:00
|
|
|
"fade-exclude" = ["class_g != 'Rofi'"];
|
2023-02-13 12:54:21 +01:00
|
|
|
# use damage information
|
2023-11-26 21:26:49 +01:00
|
|
|
"use-damage" = true;
|
2023-02-13 12:54:21 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
# }}}
|
2023-11-26 21:26:49 +01:00
|
|
|
};
|
|
|
|
}
|