# 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 swaybg ]; home.file."config" = let kdlfiles = lib.mapAttrsToList (filename: _value: "include \"${./niri/kdl}/${filename}\"") (lib.filterAttrs (key: value: value == "regular") (builtins.readDir ./niri/kdl)); startups = map (it: "spawn-at-startup ${it}") (map (lib.concatStringsSep " ") (map (map (word: "\"${word}\"")) [ ["eww" "open-many" "topBar" "bottomBar"] ["${pkgs.swaybg}/bin/swaybg" "-i" "${./niri/wallpaper.jpg}" "-m" "fill"] ["touch" ".config/niri/live.kdl"] ])); 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); }; }