summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/niri/swayosd.nix
blob: 984927c2bf16cf3b80415bf18b78be88d98496df (plain)
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
{ pkgs, ... }:
{
  config = {
    services.swayosd = {
      enable = true;
      topMargin = 0.946154;
      stylePath = pkgs.runCommand "style.css" {
        src = pkgs.writeText "style.scss" ''
          window#osd {
            padding: 12px 20px;
            border-radius: 999px;
            border: none;
            background: rgba(0, 0, 0, 0.87);

            #container {
              margin: 16px;
            }

            image,
            label {
              color: rgb(255, 255, 255);

              &:disabled {
                opacity: 1;
                color: rgb(84, 84, 84);
              }
            }

            progressbar {
              min-height: 6px;
              border-radius: 999px;
              background: transparent;
              border: none;

              trough, progress {
                min-height: inherit;
                border-radius: inherit;
                border: none;
              }

              trough {
                background: rgb(127, 127, 127);
              }
              progress {
                background: rgb(255, 255, 255);
              }

              &:disabled {
                opacity: 1;

                trough {
                  background: rgb(19, 19, 19);
                }
                progress {
                  background: rgb(38, 38, 38);
                }
              }
            }
          }
        '';
        buildInputs = with pkgs; [sass];
      } "scss -C --sourcemap=none --style=compact $src $out";
    };
  };
}