2020-09-02 04:37:42 +02: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 12:48:55 +01:00
|
|
|
format_mem = " $icon $Mug ($Mup) ";
|
|
|
|
format_swap = " $icon $SUp ";
|
2020-09-02 04:37:42 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
bottom = {
|
|
|
|
blocks = [
|
|
|
|
{
|
|
|
|
block = "cpu";
|
|
|
|
interval = 1;
|
2023-03-16 12:48:55 +01:00
|
|
|
format = " $icon $barchart ";
|
2020-09-02 04:37:42 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "load";
|
|
|
|
interval = 1;
|
2023-03-16 12:48:55 +01:00
|
|
|
format = " $icon $1m $5m ";
|
2020-09-02 04:37:42 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
icons = "awesome5";
|
|
|
|
|
|
|
|
theme = "gruvbox-dark";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2023-03-16 12:48:55 +01:00
|
|
|
test.stubs.i3status-rust = { version = "0.30.0"; };
|
2020-09-02 04:37:42 +02: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]]
|
2022-12-13 21:46:36 +01:00
|
|
|
alert = 10.0
|
2020-09-02 04:37:42 +02:00
|
|
|
block = "disk_space"
|
|
|
|
info_type = "available"
|
|
|
|
interval = 60
|
2022-12-13 21:46:36 +01:00
|
|
|
warning = 20.0
|
2020-09-02 04:37:42 +02:00
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "memory"
|
2023-03-16 12:48:55 +01:00
|
|
|
format_mem = " $icon $Mug ($Mup) "
|
|
|
|
format_swap = " $icon $SUp "
|
|
|
|
|
|
|
|
[icons]
|
|
|
|
icons = "none"
|
|
|
|
|
|
|
|
[theme]
|
|
|
|
theme = "plain"
|
2020-09-02 04:37:42 +02: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 12:48:55 +01:00
|
|
|
format = " $icon $barchart "
|
2020-09-02 04:37:42 +02:00
|
|
|
interval = 1
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "load"
|
2023-03-16 12:48:55 +01:00
|
|
|
format = " $icon $1m $5m "
|
2020-09-02 04:37:42 +02:00
|
|
|
interval = 1
|
2023-03-16 12:48:55 +01:00
|
|
|
|
|
|
|
[icons]
|
|
|
|
icons = "awesome5"
|
|
|
|
|
|
|
|
[theme]
|
|
|
|
theme = "gruvbox-dark"
|
2020-09-02 04:37:42 +02:00
|
|
|
''
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|