summaryrefslogtreecommitdiff
path: root/common/modules/dwm/picom.nix
diff options
context:
space:
mode:
authorbrustybee <beebeeb5k@gmail.com>2026-04-13 03:04:59 +0530
committerbrustybee <beebeeb5k@gmail.com>2026-04-13 03:04:59 +0530
commit1bb49481dbec223e68df4f60fa1d425525e16cff (patch)
tree66e87c01c39054b7abb51d04bfc50f63b201aaf4 /common/modules/dwm/picom.nix
parentf5b78ff561eff75c803ed1ef6e736a6c991cd135 (diff)
This is like that one dream you don't know how to describe
Diffstat (limited to 'common/modules/dwm/picom.nix')
-rw-r--r--common/modules/dwm/picom.nix63
1 files changed, 63 insertions, 0 deletions
diff --git a/common/modules/dwm/picom.nix b/common/modules/dwm/picom.nix
new file mode 100644
index 0000000..93d4b9b
--- /dev/null
+++ b/common/modules/dwm/picom.nix
@@ -0,0 +1,63 @@
+homeManager:
+{ config, lib, ... }:
+let
+ cfg = config.beeMods.dwm.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";
+ };
+ };
+ }
+ );
+}