1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-04 17:09:47 +01:00

htop: fix order or header_columns setting (backport) (#2443)

Backport of !2435 to fix #2426 on release branch.
This commit is contained in:
Bart Bakker 2021-11-30 14:15:21 +00:00 committed by GitHub
parent 7efd99ef87
commit 7329ffc6e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -623,7 +623,12 @@ in {
rightModes = deprecate "right_meter_modes" "meters.right" rightModes = deprecate "right_meter_modes" "meters.right"
(ifNonNull cfg.meters (map (m: m.mode) cfg.meters.right)); (ifNonNull cfg.meters (map (m: m.mode) cfg.meters.right));
settings' = cfg.settings // (filterAttrs (_: v: !isNull v) { before = optionalAttrs (cfg.settings ? header_layout) {
inherit (cfg.settings) header_layout;
};
settings' = (removeAttrs cfg.settings (attrNames before))
// (filterAttrs (_: v: !isNull v) {
fields = deprecate "fields" "fields" fields = deprecate "fields" "fields"
(ifNonNull cfg.fields (map (n: fields.${n}) cfg.fields)); (ifNonNull cfg.fields (map (n: fields.${n}) cfg.fields));
sort_key = deprecate "sort_key" "sortKey" sort_key = deprecate "sort_key" "sortKey"
@ -634,7 +639,8 @@ in {
deprecate' "hide_kernel_threads" "hideKernelThreads"; deprecate' "hide_kernel_threads" "hideKernelThreads";
hide_userland_threads = hide_userland_threads =
deprecate' "hide_userland_threads" "hideUserlandThreads"; deprecate' "hide_userland_threads" "hideUserlandThreads";
shadow_other_users = deprecate' "shadow_other_users" "shadowOtherUsers"; shadow_other_users =
deprecate' "shadow_other_users" "shadowOtherUsers";
show_thread_names = deprecate' "show_thread_names" "showThreadNames"; show_thread_names = deprecate' "show_thread_names" "showThreadNames";
show_program_path = deprecate' "show_program_path" "showProgramPath"; show_program_path = deprecate' "show_program_path" "showProgramPath";
highlight_base_name = highlight_base_name =
@ -648,7 +654,8 @@ in {
cpu_count_from_zero = cpu_count_from_zero =
deprecate' "cpu_count_from_zero" "cpuCountFromZero"; deprecate' "cpu_count_from_zero" "cpuCountFromZero";
show_cpu_usage = deprecate' "show_cpu_usage" "showCpuUsage"; show_cpu_usage = deprecate' "show_cpu_usage" "showCpuUsage";
show_cpu_frequency = deprecate' "show_cpu_frequency" "showCpuFrequency"; show_cpu_frequency =
deprecate' "show_cpu_frequency" "showCpuFrequency";
update_process_names = update_process_names =
deprecate' "update_process_names" "updateProcessNames"; deprecate' "update_process_names" "updateProcessNames";
account_guest_in_cpu_meter = account_guest_in_cpu_meter =
@ -662,6 +669,7 @@ in {
right_meter_modes = rightModes; right_meter_modes = rightModes;
vim_mode = deprecate' "vim_mode" "vimMode"; vim_mode = deprecate' "vim_mode" "vimMode";
}); });
in concatStringsSep "\n" (mapAttrsToList formatOption settings'); in concatStringsSep "\n" (mapAttrsToList formatOption before
++ mapAttrsToList formatOption settings');
}; };
} }