htop: fix order or header_columns setting (#2435)
When `header_columns` is in settings it must appear before any of the `column_meters_*` options. Fixes 2426.
This commit is contained in:
parent
275f955db9
commit
7523252f97
3 changed files with 50 additions and 3 deletions
|
|
@ -170,9 +170,18 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
before = optionalAttrs (cfg.settings ? header_layout) {
|
||||
inherit (cfg.settings) header_layout;
|
||||
};
|
||||
|
||||
settings = defaults // (removeAttrs cfg.settings (attrNames before));
|
||||
|
||||
formatOptions = mapAttrsToList formatOption;
|
||||
|
||||
in mkIf (cfg.settings != { }) {
|
||||
text = concatStringsSep "\n"
|
||||
(mapAttrsToList formatOption (defaults // cfg.settings)) + "\n";
|
||||
text =
|
||||
concatStringsSep "\n" (formatOptions before ++ formatOptions settings)
|
||||
+ "\n";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue