htop: fix darwin defaults
M_SHARE is not a valid column on Darwin. It seems that previously htop ignored unknown columns, but the current version does not display all subsequent columns.
This commit is contained in:
parent
cb9f03d519
commit
e6869735d2
3 changed files with 34 additions and 18 deletions
|
|
@ -3,6 +3,7 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin;
|
||||
|
||||
cfg = config.programs.htop;
|
||||
|
||||
|
|
@ -73,6 +74,21 @@ let
|
|||
M_PSSWP = 120;
|
||||
};
|
||||
|
||||
defaultFields = with fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
|
||||
modes = {
|
||||
Bar = 1;
|
||||
Text = 2;
|
||||
|
|
@ -154,20 +170,10 @@ in {
|
|||
|
||||
xdg.configFile."htop/htoprc" = let
|
||||
defaults = {
|
||||
fields = with fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
fields = if isDarwin then
|
||||
remove fields.M_SHARE defaultFields
|
||||
else
|
||||
defaultFields;
|
||||
};
|
||||
|
||||
before = optionalAttrs (cfg.settings ? header_layout) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue