diff options
| author | brustybee <bee@4d2.org> | 2026-03-11 10:38:51 +0530 |
|---|---|---|
| committer | brustybee <bee@4d2.org> | 2026-03-11 10:38:51 +0530 |
| commit | 6d8eec22cddf0be0c190fb06c88f9fd9e3838757 (patch) | |
| tree | 8d75504041c3a555a01f19002428c75fba190ef4 /common/modules/dwm/picom.nix | |
| parent | 870745197024128e29c4f461a0e09d36dcf348bb (diff) | |
Add dwm
Diffstat (limited to 'common/modules/dwm/picom.nix')
| -rw-r--r-- | common/modules/dwm/picom.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/common/modules/dwm/picom.nix b/common/modules/dwm/picom.nix new file mode 100644 index 0000000..962d3ea --- /dev/null +++ b/common/modules/dwm/picom.nix @@ -0,0 +1,58 @@ +{ config, lib, ... }: +let + cfg = config.beeMods.dwm.picom; +in +{ + services.picom = { + enable = cfg.enable; + backend = "glx"; + vSync = true; + + activeOpacity = if cfg.window.blur.enable then 0.87 else cfg.window.opacity.active; + inactiveOpacity = if cfg.window.blur.enable then 0.87 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 = lib.mkIf cfg.enable { + Unit = { + ConditionEnvironment = "XDG_SESSION_TYPE=x11"; + }; + }; +} |
