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
|
{ pkgs, wallpaper, style, util, setting, ... } @args: let
|
||||||
mkConfig = { modules }: builtins.foldl' (acc: mod:
|
mkConfig = { modules }: builtins.foldl' (acc: mod:
|
||||||
acc + (import mod args).text
|
acc + util.trimTabs((import mod args).text)
|
||||||
) "" modules;
|
) "" modules;
|
||||||
|
|
||||||
swayRc = mkConfig {
|
swayRc = mkConfig {
|
||||||
|
@ -27,9 +27,9 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
config = util.trimTabs (''
|
config = (util.trimTabs ''
|
||||||
# Read `man 5 sway` for a complete reference.
|
# Read `man 5 sway` for a complete reference.
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
'' + swayRc);
|
'') + swayRc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,7 @@
|
||||||
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
||||||
|
|
||||||
# Concat all files by `text` key.
|
# Concat all files by `text` key.
|
||||||
catAllText = path: args: trimTabs (
|
catAllText = path: args: builtins.foldl' (acc: mod:
|
||||||
(builtins.foldl' (acc: mod:
|
acc + trimTabs ((import mod args).text)
|
||||||
acc + (import mod args).text
|
) "" (ls path);
|
||||||
) "" (ls path))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue