diff options
| author | brustybee <beebeeb5k@gmail.com> | 2026-04-03 18:17:46 +0530 |
|---|---|---|
| committer | brustybee <beebeeb5k@gmail.com> | 2026-04-03 18:17:46 +0530 |
| commit | f8223622fed02aef1075d41e4dba090df81bf6c1 (patch) | |
| tree | dcff61f6f82dd6be4a8f31ab284e0fd41b53d9ad /common/modules/x11/picom.nix | |
| parent | a4a87bd11e228a2a57bfedd48d3594371cf40329 (diff) | |
YEP.
Diffstat (limited to 'common/modules/x11/picom.nix')
| -rw-r--r-- | common/modules/x11/picom.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/common/modules/x11/picom.nix b/common/modules/x11/picom.nix new file mode 100644 index 0000000..c1683eb --- /dev/null +++ b/common/modules/x11/picom.nix @@ -0,0 +1,63 @@ +homeManager: +{ config, lib, ... }: +let + cfg = config.beeMods.x11.picom; +in +{ + config = lib.mkIf cfg.enable ( + lib.optionalAttrs homeManager { + services.picom = { + enable = true; + backend = "glx"; + vSync = true; + + activeOpacity = if cfg.window.blur.enable then 0.82 else cfg.window.opacity.active; + inactiveOpacity = if cfg.window.blur.enable then 0.82 else cfg.window.opacity.inactive; + + opacityRules = [ + "100:fullscreen" + "100:_NET_WM_STATE@:32a *= '_NET_WM_STATE_FULLSCREEN'" + ]; + settings = { + blur = { + method = "dual_kawase"; + strength = cfg.window.blur.strength; + size = cfg.window.blur.size; + }; + blur-background = cfg.window.blur.enable; + blur-background-exclude = [ + "window_type = 'dock'" + "window_type = 'desktop'" + "class_g = 'slop'" + "class_g = 'dwm'" + "_GTK_FRAME_EXTENTS@" + "fullscreen" + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_FULLSCREEN'" + ]; + + # xrender-sync-fence = true; + use-damage = true; + + unredir-if-possible = true; + + detect-transient = true; + detect-client-opacity = true; + mark-wmwin-focused = true; + mark-ovredir-focused = true; + detect-rounded-corners = true; + + shadow = cfg.shadow; + fading = false; + animations = cfg.animations; + }; + }; + + # systemd.user.services.picom.Install.wantedBy = lib.mkForce [ ]; + systemd.user.services.picom = { + Unit = { + ConditionEnvironment = "XDG_SESSION_TYPE=x11"; + }; + }; + } + ); +} |
