Is it possible to use builtins.readFile
to read a config file for Waybar?
If yes, does anyone have an example of a Waybar config file that is read this way?
When I do this:
programs.waybar.settings = (builtins.readFile ./config.default);
I get the error:
...programs.waybar.settings is not of type (list of (JSON value)) or attrubute set of (JSON value)
.
The content of config.default
is based on the the example config, converted to valid JSON:
{
"mainBar": {
"layer": "top",
"position": "top",
"height": 30,
"output": [
"eDP-1",
"HDMI-A-1"
],
"modules-left": [
"sway/workspaces",
"sway/mode",
"wlr/taskbar"
],
"modules-center": [
"sway/window"
],
"modules-right": [
"mpd",
"custom/mymodule#with-css-id",
"temperature"
],
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true
}
}
}