dotfiles/modules/services/picom.nix

52 lines
1.1 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-10-15 20:00:09 +02:00
options.my.services.picom.enable = mkEnableOption "picom";
2022-07-15 13:11:54 +02:00
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-10-06 20:27:14 +02:00
# against flicker
unredir-if-possible = false;
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;
};
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
}