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:
parent
7efd99ef87
commit
7329ffc6e9
1 changed files with 48 additions and 40 deletions
|
@ -623,45 +623,53 @@ 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) {
|
||||||
fields = deprecate "fields" "fields"
|
inherit (cfg.settings) header_layout;
|
||||||
(ifNonNull cfg.fields (map (n: fields.${n}) cfg.fields));
|
};
|
||||||
sort_key = deprecate "sort_key" "sortKey"
|
|
||||||
(ifNonNull cfg.sortKey fields.${cfg.sortKey});
|
settings' = (removeAttrs cfg.settings (attrNames before))
|
||||||
sort_direction = deprecate' "sort_direction" "sortDescending";
|
// (filterAttrs (_: v: !isNull v) {
|
||||||
hide_threads = deprecate' "hide_threads" "hideThreads";
|
fields = deprecate "fields" "fields"
|
||||||
hide_kernel_threads =
|
(ifNonNull cfg.fields (map (n: fields.${n}) cfg.fields));
|
||||||
deprecate' "hide_kernel_threads" "hideKernelThreads";
|
sort_key = deprecate "sort_key" "sortKey"
|
||||||
hide_userland_threads =
|
(ifNonNull cfg.sortKey fields.${cfg.sortKey});
|
||||||
deprecate' "hide_userland_threads" "hideUserlandThreads";
|
sort_direction = deprecate' "sort_direction" "sortDescending";
|
||||||
shadow_other_users = deprecate' "shadow_other_users" "shadowOtherUsers";
|
hide_threads = deprecate' "hide_threads" "hideThreads";
|
||||||
show_thread_names = deprecate' "show_thread_names" "showThreadNames";
|
hide_kernel_threads =
|
||||||
show_program_path = deprecate' "show_program_path" "showProgramPath";
|
deprecate' "hide_kernel_threads" "hideKernelThreads";
|
||||||
highlight_base_name =
|
hide_userland_threads =
|
||||||
deprecate' "highlight_base_name" "highlightBaseName";
|
deprecate' "hide_userland_threads" "hideUserlandThreads";
|
||||||
highlight_megabytes =
|
shadow_other_users =
|
||||||
deprecate' "highlight_megabytes" "highlightMegabytes";
|
deprecate' "shadow_other_users" "shadowOtherUsers";
|
||||||
highlight_threads = deprecate' "highlight_threads" "highlightThreads";
|
show_thread_names = deprecate' "show_thread_names" "showThreadNames";
|
||||||
tree_view = deprecate' "tree_view" "treeView";
|
show_program_path = deprecate' "show_program_path" "showProgramPath";
|
||||||
header_margin = deprecate' "header_margin" "headerMargin";
|
highlight_base_name =
|
||||||
detailed_cpu_time = deprecate' "detailed_cpu_time" "detailedCpuTime";
|
deprecate' "highlight_base_name" "highlightBaseName";
|
||||||
cpu_count_from_zero =
|
highlight_megabytes =
|
||||||
deprecate' "cpu_count_from_zero" "cpuCountFromZero";
|
deprecate' "highlight_megabytes" "highlightMegabytes";
|
||||||
show_cpu_usage = deprecate' "show_cpu_usage" "showCpuUsage";
|
highlight_threads = deprecate' "highlight_threads" "highlightThreads";
|
||||||
show_cpu_frequency = deprecate' "show_cpu_frequency" "showCpuFrequency";
|
tree_view = deprecate' "tree_view" "treeView";
|
||||||
update_process_names =
|
header_margin = deprecate' "header_margin" "headerMargin";
|
||||||
deprecate' "update_process_names" "updateProcessNames";
|
detailed_cpu_time = deprecate' "detailed_cpu_time" "detailedCpuTime";
|
||||||
account_guest_in_cpu_meter =
|
cpu_count_from_zero =
|
||||||
deprecate' "account_guest_in_cpu_meter" "accountGuestInCpuMeter";
|
deprecate' "cpu_count_from_zero" "cpuCountFromZero";
|
||||||
color_scheme = deprecate' "color_scheme" "colorScheme";
|
show_cpu_usage = deprecate' "show_cpu_usage" "showCpuUsage";
|
||||||
enable_mouse = deprecate' "enable_mouse" "enableMouse";
|
show_cpu_frequency =
|
||||||
delay = deprecate' "delay" "delay";
|
deprecate' "show_cpu_frequency" "showCpuFrequency";
|
||||||
left_meters = leftMeters;
|
update_process_names =
|
||||||
left_meter_modes = leftModes;
|
deprecate' "update_process_names" "updateProcessNames";
|
||||||
right_meters = rightMeters;
|
account_guest_in_cpu_meter =
|
||||||
right_meter_modes = rightModes;
|
deprecate' "account_guest_in_cpu_meter" "accountGuestInCpuMeter";
|
||||||
vim_mode = deprecate' "vim_mode" "vimMode";
|
color_scheme = deprecate' "color_scheme" "colorScheme";
|
||||||
});
|
enable_mouse = deprecate' "enable_mouse" "enableMouse";
|
||||||
in concatStringsSep "\n" (mapAttrsToList formatOption settings');
|
delay = deprecate' "delay" "delay";
|
||||||
|
left_meters = leftMeters;
|
||||||
|
left_meter_modes = leftModes;
|
||||||
|
right_meters = rightMeters;
|
||||||
|
right_meter_modes = rightModes;
|
||||||
|
vim_mode = deprecate' "vim_mode" "vimMode";
|
||||||
|
});
|
||||||
|
in concatStringsSep "\n" (mapAttrsToList formatOption before
|
||||||
|
++ mapAttrsToList formatOption settings');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue