Util : Fix catAllText extra tabs at newlines.
This commit is contained in:
parent
17d354489f
commit
f5d325a414
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, wallpaper, style, util, setting, ... } @args: let
|
||||
mkConfig = { modules }: builtins.foldl' (acc: mod:
|
||||
acc + (import mod args).text
|
||||
acc + util.trimTabs((import mod args).text)
|
||||
) "" modules;
|
||||
|
||||
swayRc = mkConfig {
|
||||
|
@ -27,9 +27,9 @@
|
|||
];
|
||||
};
|
||||
in {
|
||||
config = util.trimTabs (''
|
||||
config = (util.trimTabs ''
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
include /etc/sway/config.d/*
|
||||
'' + swayRc);
|
||||
'') + swayRc;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,7 @@
|
|||
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
||||
|
||||
# Concat all files by `text` key.
|
||||
catAllText = path: args: trimTabs (
|
||||
(builtins.foldl' (acc: mod:
|
||||
acc + (import mod args).text
|
||||
) "" (ls path))
|
||||
);
|
||||
catAllText = path: args: builtins.foldl' (acc: mod:
|
||||
acc + trimTabs ((import mod args).text)
|
||||
) "" (ls path);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue