polybar: minor reformatting

This commit is contained in:
Robert Helgesson 2018-08-29 21:46:11 +02:00
parent 629d66e0b9
commit 4602c00dcf
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -10,18 +10,18 @@ let
toPolybarIni = generators.toINI {
mkKeyValue = key: value:
let
quoted = v:
if hasPrefix " " v || hasSuffix " " v
then ''"${v}"''
else v;
let
quoted = v:
if hasPrefix " " v || hasSuffix " " v
then ''"${v}"''
else v;
value' =
if isBool value then (if value then "true" else "false")
else if (isString value && key != "include-file") then quoted value
else toString value;
in
"${key}=${value'}";
value' =
if isBool value then (if value then "true" else "false")
else if (isString value && key != "include-file") then quoted value
else toString value;
in
"${key}=${value'}";
};
configFile = pkgs.writeText "polybar.conf"