summaryrefslogtreecommitdiff
path: root/common/modules/dwm/picom.nix
diff options
context:
space:
mode:
Diffstat (limited to 'common/modules/dwm/picom.nix')
-rw-r--r--common/modules/dwm/picom.nix84
1 files changed, 43 insertions, 41 deletions
diff --git a/common/modules/dwm/picom.nix b/common/modules/dwm/picom.nix
index 962d3ea..34b31c2 100644
--- a/common/modules/dwm/picom.nix
+++ b/common/modules/dwm/picom.nix
@@ -3,56 +3,58 @@ let
cfg = config.beeMods.dwm.picom;
in
{
- services.picom = {
- enable = cfg.enable;
- backend = "glx";
- vSync = true;
+ config = lib.mkIf cfg.enable {
+ services.picom = {
+ enable = true;
+ 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;
+ 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'"
+ 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;
+ # xrender-sync-fence = true;
+ use-damage = true;
- unredir-if-possible = true;
+ unredir-if-possible = true;
- detect-transient = true;
- detect-client-opacity = true;
- mark-wmwin-focused = true;
- mark-ovredir-focused = true;
- detect-rounded-corners = 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;
+ 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";
+ # systemd.user.services.picom.Install.wantedBy = lib.mkForce [ ];
+ systemd.user.services.picom = {
+ Unit = {
+ ConditionEnvironment = "XDG_SESSION_TYPE=x11";
+ };
};
};
}