~ruther/nixos-config

ref: 64749139edb998bd8ad0dd48c5911d76709ddd66 nixos-config/modules/services/picom.nix -rw-r--r-- 2.8 KiB
64749139 — František Boháček feat: add qtile config 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# Compositor
#

{ config, lib, pkgs, ... }:

{ 
  services.picom = {
    enable = true;
    package = pkgs.picom.overrideAttrs(o: {
      src = pkgs.fetchFromGitHub {
        #repo = "picom";
        #owner = "pijulius";
        #rev = "982bb43e5d4116f1a37a0bde01c9bda0b88705b9";
        #sha256 = "YiuLScDV9UfgI1MiYRtjgRkJ0VuA1TExATA2nJSJMhM=";
        repo = "picom";
        owner = "jonaburg";
        rev = "e3c19cd7d1108d114552267f302548c113278d45";
        sha256 = "4voCAYd0fzJHQjJo4x3RoWz5l3JJbRvgIXn1Kg6nz6Y=";
      };
    });                                           # Override picom to use pijulius' version

    backend = "glx";                              # Rendering either with glx or xrender. You'll know if you need to switch this.
    vSync = true;                                 # Should fix screen tearing

    #activeOpacity = 0.93;                         # Node transparency
    #inactiveOpacity = 0.93;
    #menuOpacity = 0.93;

    shadow = false;                               # Shadows
    shadowOpacity = 0.75;
    fade = true;                                  # Fade
    fadeDelta = 10;
    opacityRules = [                              # Opacity rules if transparency is prefered
    #  "100:name = 'Picture in picture'"
    #  "100:name = 'Picture-in-Picture'"
    #  "85:class_i ?= 'rofi'"
      "80:class_i *= 'discord'"
      "80:class_i *= 'emacs'"
      "80:class_i *= 'Alacritty'"
    #  "100:fullscreen"
    ];                                            # Find with $ xprop | grep "WM_CLASS"

    settings = {
      daemon = true;
      use-damage = false;                         # Fixes flickering and visual bugs with borders
      resize-damage = 1;
      refresh-rate = 0;
      corner-radius = 5;                          # Corners
      round-borders = 5;

      # Animations Pijulius
      #animations = true;                          # All Animations
      #animation-window-mass = 0.5;
      #animation-for-open-window = "zoom";
      #animation-stiffness = 350;
      #animation-clamping = false;
      #fade-out-step = 1;                          # Will fix random border dots from not disappearing

      # Animations Jonaburg
      transition-length = 300;
      transition-pow-x = 0.5;
      transition-pow-y = 0.5;
      transition-pow-w = 0.5;
      transition-pow-h = 0.5;
      size-transition = true;

      # Extras
      detect-rounded-corners = true;              # Below should fix multiple issues
      detect-client-opacity = false;
      detect-transient = true;
      detect-client-leader = false;
      mark-wmwim-focused = true;
      mark-ovredir-focues = true;
      unredir-if-possible = true;
      glx-no-stencil = true;
      glx-no-rebind-pixmap = true;
    };                                           # Extra options for picom.conf (mostly for pijulius fork)
  };
}
Do not follow this link