summaryrefslogtreecommitdiff
path: root/modules/htop.nix
blob: 647abf787ac32759118641daf9b464078e3ed81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ config, lib, ... }:
with lib;
let
  cfg = config.nixfiles.modules.htop;
in
{
  options.nixfiles.modules.htop.enable = mkEnableOption "htop";

  config = mkIf cfg.enable {
    hm.programs.htop = {
      enable = true;

      settings = with config.hm.lib.htop; {
        fields = with fields; [
          PID
          USER
          PRIORITY
          NICE
          M_SIZE
          M_RESIDENT
          M_SHARE
          STATE
          PERCENT_CPU
          PERCENT_MEM
          TIME
          COMM
        ];
        account_guest_in_cpu_meter = 1;
        detailed_cpu_time = 0;
        enable_mouse = 0;
        find_comm_in_cmdline = 1;
        header_margin = 1;
        hide_function_bar = 1;
        hide_kernel_threads = 1;
        hide_userland_threads = 1;
        highlight_base_name = 1;
        highlight_changes = 0;
        highlight_changes_delay_secs = 1;
        highlight_deleted_exe = 1;
        highlight_megabytes = 1;
        highlight_threads = 1;
        shadow_other_users = 1;
        show_cpu_frequency = 1;
        show_cpu_usage = 1;
        show_program_path = 0;
        show_thread_names = 0;
        strip_exe_from_cmdline = 1;
        tree_view = 1;
        tree_view_always_by_pid = 1;
        update_process_names = 1;
      };
    };
  };
}