summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/niri/swayosd.nix
blob: 8e410b5a7bebbb5d8d66fb7aff59fdeb8a9c451c (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
{ 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);
            }

            progressbar:disabled,
            image:disabled {
              opacity: rgb(84, 84, 84);
            }

            progressbar {
              min-height: 6px;
              border-radius: 999px;
              background: transparent;
              border: none;
            }
            trough {
              min-height: inherit;
              border-radius: inherit;
              border: none;
              background: rgb(127, 127, 127);
            }
            progress {
              min-height: inherit;
              border-radius: inherit;
              border: none;
              background: rgb(255, 255, 255);
            }
          }
        '';
        buildInputs = with pkgs; [sass];
      } "scss -C --sourcemap=none $src $out";
    };
  };
}