2020-09-02 02:37:42 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.i3status-rust = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
bars = {
|
|
|
|
|
|
|
|
top = {
|
|
|
|
blocks = [
|
|
|
|
{
|
|
|
|
block = "disk_space";
|
|
|
|
info_type = "available";
|
|
|
|
interval = 60;
|
|
|
|
warning = 20.0;
|
|
|
|
alert = 10.0;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "memory";
|
2023-03-16 11:48:55 +00:00
|
|
|
format_mem = " $icon $Mug ($Mup) ";
|
|
|
|
format_swap = " $icon $SUp ";
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
bottom = {
|
|
|
|
blocks = [
|
|
|
|
{
|
|
|
|
block = "cpu";
|
|
|
|
interval = 1;
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $barchart ";
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "load";
|
|
|
|
interval = 1;
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $1m $5m ";
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
icons = "awesome5";
|
|
|
|
|
|
|
|
theme = "gruvbox-dark";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2023-03-16 11:48:55 +00:00
|
|
|
test.stubs.i3status-rust = { version = "0.30.0"; };
|
2020-09-02 02:37:42 +00:00
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-files/.config/i3status-rust/config-top.toml
|
|
|
|
assertFileContent home-files/.config/i3status-rust/config-top.toml \
|
|
|
|
${
|
|
|
|
pkgs.writeText "i3status-rust-expected-config" ''
|
|
|
|
[[block]]
|
|
|
|
block = "disk_space"
|
2023-05-01 21:46:41 +00:00
|
|
|
alert = 10
|
2020-09-02 02:37:42 +00:00
|
|
|
info_type = "available"
|
|
|
|
interval = 60
|
2023-05-01 21:46:41 +00:00
|
|
|
warning = 20
|
2020-09-02 02:37:42 +00:00
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "memory"
|
2023-03-16 11:48:55 +00:00
|
|
|
format_mem = " $icon $Mug ($Mup) "
|
|
|
|
format_swap = " $icon $SUp "
|
|
|
|
|
|
|
|
[icons]
|
|
|
|
icons = "none"
|
|
|
|
|
|
|
|
[theme]
|
|
|
|
theme = "plain"
|
2020-09-02 02:37:42 +00:00
|
|
|
''
|
|
|
|
}
|
|
|
|
|
|
|
|
assertFileExists home-files/.config/i3status-rust/config-bottom.toml
|
|
|
|
assertFileContent \
|
|
|
|
home-files/.config/i3status-rust/config-bottom.toml \
|
|
|
|
${
|
|
|
|
pkgs.writeText "i3status-rust-expected-config" ''
|
|
|
|
[[block]]
|
|
|
|
block = "cpu"
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $barchart "
|
2020-09-02 02:37:42 +00:00
|
|
|
interval = 1
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "load"
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $1m $5m "
|
2020-09-02 02:37:42 +00:00
|
|
|
interval = 1
|
2023-03-16 11:48:55 +00:00
|
|
|
|
|
|
|
[icons]
|
|
|
|
icons = "awesome5"
|
|
|
|
|
|
|
|
[theme]
|
|
|
|
theme = "gruvbox-dark"
|
2020-09-02 02:37:42 +00:00
|
|
|
''
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|