2021-05-18 23:36:08 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.htop.enable = true;
|
|
|
|
programs.htop.settings = {
|
|
|
|
color_scheme = 6;
|
|
|
|
cpu_count_from_one = 0;
|
|
|
|
delay = 15;
|
|
|
|
fields = with config.lib.htop.fields; [
|
|
|
|
PID
|
|
|
|
USER
|
|
|
|
PRIORITY
|
|
|
|
NICE
|
|
|
|
M_SIZE
|
|
|
|
M_RESIDENT
|
|
|
|
M_SHARE
|
|
|
|
STATE
|
|
|
|
PERCENT_CPU
|
|
|
|
PERCENT_MEM
|
|
|
|
TIME
|
|
|
|
COMM
|
|
|
|
];
|
|
|
|
highlight_base_name = 1;
|
|
|
|
highlight_megabytes = 1;
|
|
|
|
highlight_threads = 1;
|
|
|
|
} // (with config.lib.htop;
|
2021-06-02 23:27:17 +00:00
|
|
|
leftMeters [ (bar "AllCPUs2") (bar "Memory") (bar "Swap") (text "Zram") ])
|
|
|
|
// (with config.lib.htop;
|
|
|
|
rightMeters [
|
|
|
|
(text "Tasks")
|
|
|
|
(text "LoadAverage")
|
|
|
|
(text "Uptime")
|
|
|
|
(text "Systemd")
|
|
|
|
]);
|
2021-05-18 23:36:08 +00:00
|
|
|
|
2021-09-26 09:08:45 +00:00
|
|
|
test.stubs.htop = { };
|
2021-08-16 21:29:49 +00:00
|
|
|
|
2021-05-18 23:36:08 +00:00
|
|
|
nmt.script = ''
|
2021-07-29 12:38:01 +00:00
|
|
|
htoprc=home-files/.config/htop/htoprc
|
|
|
|
assertFileExists $htoprc
|
|
|
|
assertFileContent $htoprc ${./example-htoprc.txt}
|
2021-05-18 23:36:08 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|