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 { 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"