aboutsummaryrefslogtreecommitdiff
path: root/home/rices/schrottkatze/niri.nix
blob: a69685f7522ea382648f3af18c56e5c1b0922e85 (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
# this file must only be saved via autosave due to the formatter.
# else it will be ugly
{pkgs, lib, ...}: {
  home.packages = with pkgs; [
    zenity
    xwayland-satellite
  ];
  home.file."config" =
    let
      kdlfiles =
        builtins.readDir ./niri/kdl
        |> lib.filterAttrs (key: value: value == "regular")
        |> lib.mapAttrsToList (filename: _value: "include \"${./niri/kdl}/${filename}\"");
      startups =
        [
          ["eww" "open-many" "topBar" "bottomBar"]
          ["${pkgs.swaybg}/bin/swaybg" "-i" "${./niri/wallpaper.jpg}" "-m" "fill"]
          ["touch" ".config/niri/live.kdl"]
        ]
        |> map (map (word: "\"${word}\""))
        |> map (lib.concatStringsSep " ")
        |> map (it: "spawn-at-startup ${it}");
      other = [
        "include \"live.kdl\""
        "output \"eDP-1\" { scale 1.1; }"
        "animations { window-open { duration-ms 3000; curve \"linear\"; custom-shader r\"\n${builtins.readFile ./niri/shaders/arc.frag}\";};}"
        "binds {Mod+Shift+I { spawn \"${./niri/scripts/cpdate.sh}\"; }; }"
      ];
    in {
      target = ".config/niri/config.kdl";
      text = lib.concatLines (startups ++ kdlfiles ++ other);
    };
}