polybar: minor reformatting
This commit is contained in:
parent
629d66e0b9
commit
4602c00dcf
|
@ -10,18 +10,18 @@ let
|
||||||
|
|
||||||
toPolybarIni = generators.toINI {
|
toPolybarIni = generators.toINI {
|
||||||
mkKeyValue = key: value:
|
mkKeyValue = key: value:
|
||||||
let
|
let
|
||||||
quoted = v:
|
quoted = v:
|
||||||
if hasPrefix " " v || hasSuffix " " v
|
if hasPrefix " " v || hasSuffix " " v
|
||||||
then ''"${v}"''
|
then ''"${v}"''
|
||||||
else v;
|
else v;
|
||||||
|
|
||||||
value' =
|
value' =
|
||||||
if isBool value then (if value then "true" else "false")
|
if isBool value then (if value then "true" else "false")
|
||||||
else if (isString value && key != "include-file") then quoted value
|
else if (isString value && key != "include-file") then quoted value
|
||||||
else toString value;
|
else toString value;
|
||||||
in
|
in
|
||||||
"${key}=${value'}";
|
"${key}=${value'}";
|
||||||
};
|
};
|
||||||
|
|
||||||
configFile = pkgs.writeText "polybar.conf"
|
configFile = pkgs.writeText "polybar.conf"
|
||||||
|
|
Loading…
Reference in a new issue