Use htop-vim
This commit is contained in:
parent
e3d0a6ef5e
commit
fde51d0902
3 changed files with 14 additions and 17 deletions
|
|
@ -49,7 +49,7 @@ with lib.my; {
|
||||||
inetutils
|
inetutils
|
||||||
man
|
man
|
||||||
|
|
||||||
htop
|
htop-vim
|
||||||
ncdu
|
ncdu
|
||||||
nload
|
nload
|
||||||
pciutils
|
pciutils
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
networking.firewall.allowedTCPPorts = [ 53 ];
|
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ vim htop ];
|
environment.systemPackages = with pkgs; [ vim htop-vim ];
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,17 @@ with lib;
|
||||||
with lib.my;
|
with lib.my;
|
||||||
let cfg = config.modules.desktop.htop;
|
let cfg = config.modules.desktop.htop;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.htop = {
|
options.modules.desktop.htop = { enable = mkBoolOpt false; };
|
||||||
enable = mkBoolOpt false;
|
|
||||||
};
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home-manager.users.${config.user.name} = { config, ... }: {
|
home-manager.users.${config.user.name} = { config, ... }: {
|
||||||
programs.htop = {
|
programs.htop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.htop-vim;
|
||||||
settings = {
|
settings = {
|
||||||
hide_userland_threads = true;
|
hide_userland_threads = true;
|
||||||
highlight_base_name = true;
|
highlight_base_name = true;
|
||||||
vim_mode = true;
|
vim_mode = true;
|
||||||
fields = with config.lib.htop.fields;[
|
fields = with config.lib.htop.fields; [
|
||||||
PID
|
PID
|
||||||
USER
|
USER
|
||||||
M_RESIDENT
|
M_RESIDENT
|
||||||
|
|
@ -27,21 +26,19 @@ in {
|
||||||
TIME
|
TIME
|
||||||
COMM
|
COMM
|
||||||
];
|
];
|
||||||
} // (
|
} // (with config.lib.htop;
|
||||||
with config.lib.htop; leftMeters [
|
leftMeters [
|
||||||
(bar "LeftCPUs2")
|
(bar "LeftCPUs2")
|
||||||
(bar "CPU")
|
(bar "CPU")
|
||||||
(bar "Memory")
|
(bar "Memory")
|
||||||
(bar "Swap")
|
(bar "Swap")
|
||||||
]
|
]) // (with config.lib.htop;
|
||||||
) // (
|
rightMeters [
|
||||||
with config.lib.htop; rightMeters [
|
|
||||||
(bar "RightCPUs2")
|
(bar "RightCPUs2")
|
||||||
(text "Tasks")
|
(text "Tasks")
|
||||||
(text "LoadAverage")
|
(text "LoadAverage")
|
||||||
(text "Uptime")
|
(text "Uptime")
|
||||||
]
|
]);
|
||||||
);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue