nix-configs/modules/desktop/compositing.nix

39 lines
929 B
Nix
Raw Normal View History

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