dotfiles/modules/services/picom.nix

56 lines
1.2 KiB
Nix
Raw Normal View History

2022-07-15 13:11:54 +02:00
{ config
, lib
, pkgs
, ...
}:
2021-09-09 21:55:28 +02:00
2022-07-15 13:11:54 +02:00
with lib;
let
cfg = config.my.services.picom;
in
2021-11-11 18:34:54 +01:00
{
2022-07-15 13:11:54 +02:00
options.my.services.picom = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = lib.mkIf cfg.enable {
home-manager.users.moritz = {
services.picom = {
enable = true;
package = pkgs.picom-next;
settings = {
blur = true;
blurExclude = [ "class_g = 'Polybar'" ];
# improve performance
glx-no-rebind-pixmap = true;
glx-no-stencil = true;
2021-09-10 11:16:30 +02:00
2022-07-15 13:11:54 +02:00
# fastest swap method
glx-swap-method = 1;
2021-09-10 11:16:30 +02:00
2022-07-15 13:11:54 +02:00
# dual kawase blur
blur-background-fixed = false;
blur-method = "dual_kawase";
blur-strength = 2;
2021-09-10 11:16:30 +02:00
2022-07-15 13:11:54 +02:00
# group wintypes and don't focus a menu (Telegram)
detect-transient = true;
detect-client-leader = true;
2021-09-10 11:16:30 +02:00
2022-07-15 13:11:54 +02:00
# needed for nvidia with glx backend
xrender-sync-fence = true;
};
experimentalBackends = true;
inactiveOpacity = 0.97;
opacityRules = [ "100:fullscreen" "100:class_g = 'Polybar'" ];
vSync = true;
};
2021-09-09 21:55:28 +02:00
};
2021-09-15 00:41:46 +02:00
};
2021-11-11 18:34:54 +01:00
}