mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-27 10:52:52 +01:00
This commit adds NixOS module option generation for komorebi and komorebi-bar configurations, along with a nix and JSONSchema validation test harness that runs as part of `nix flake check`. `schemars-nixgen` (same as `schemars-docgen`, not sure if I'm gonna release this...) generates strongly-typed Nix option definitions from the generated JSONSchema files, allowing users to write type-checked Nix configurations that map directly to the config files. This will eventually be plugged into a nix-darwin module which I have yet to start writing.
72 lines
1.2 KiB
Nix
72 lines
1.2 KiB
Nix
# Nix equivalent of docs/komorebi.bar.example.json
|
|
# This tests that users can write the exact same config in Nix
|
|
{ ... }:
|
|
{
|
|
komorebi-bar = {
|
|
monitor = 0;
|
|
font_family = "JetBrainsMono Nerd Font";
|
|
height = 30.0;
|
|
|
|
theme = {
|
|
palette = "Base16";
|
|
name = "Ashes";
|
|
accent = "Base0D";
|
|
};
|
|
|
|
left_widgets = [
|
|
{
|
|
Komorebi = {
|
|
workspaces = {
|
|
enable = true;
|
|
hide_empty_workspaces = false;
|
|
};
|
|
layout = {
|
|
enable = true;
|
|
};
|
|
focused_container = {
|
|
enable = true;
|
|
show_icon = true;
|
|
};
|
|
};
|
|
}
|
|
];
|
|
|
|
right_widgets = [
|
|
{
|
|
Update = {
|
|
enable = true;
|
|
};
|
|
}
|
|
{
|
|
Storage = {
|
|
enable = true;
|
|
};
|
|
}
|
|
{
|
|
Memory = {
|
|
enable = true;
|
|
};
|
|
}
|
|
{
|
|
Network = {
|
|
enable = true;
|
|
show_activity = true;
|
|
show_total_activity = true;
|
|
};
|
|
}
|
|
{
|
|
Date = {
|
|
enable = true;
|
|
format = "DayDateMonthYear";
|
|
};
|
|
}
|
|
{
|
|
Time = {
|
|
enable = true;
|
|
format = "TwentyFourHour";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|