{ config, lib, ... }: with lib; let cfg = config.mjallen.programs.btop; palette = import cfg.theme.file; in { imports = [ ./options.nix ]; config = mkIf cfg.enable { programs.btop = { enable = true; settings = { color_theme = "global"; theme_background = true; truecolor = true; force_tty = false; presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"; vim_keys = true; rounded_corners = true; graph_symbol = "braille"; graph_symbol_cpu = "default"; graph_symbol_mem = "default"; graph_symbol_net = "default"; graph_symbol_proc = "default"; shown_boxes = "cpu mem net proc"; update_ms = 2000; proc_sorting = "cpu lazy"; proc_reversed = false; proc_tree = false; proc_colors = true; proc_gradient = true; proc_per_core = false; proc_mem_bytes = true; proc_cpu_graphs = true; proc_info_smaps = false; proc_left = false; proc_filter_kernel = false; cpu_graph_upper = "total"; cpu_graph_lower = "total"; cpu_invert_lower = true; cpu_single_graph = false; cpu_bottom = false; show_uptime = true; check_temp = true; cpu_sensor = "Auto"; show_coretemp = true; cpu_core_map = ""; temp_scale = "celsius"; base_10_sizes = false; show_cpu_freq = true; clock_format = "%X"; background_update = true; custom_cpu_name = ""; disks_filter = ""; mem_graphs = true; mem_below_net = false; zfs_arc_cached = true; show_swap = true; swap_disk = true; show_disks = true; only_physical = true; use_fstab = true; zfs_hide_datasets = false; disk_free_priv = false; show_io_stat = true; io_mode = false; io_graph_combined = false; io_graph_speeds = ""; net_download = 100; net_upload = 100; net_auto = true; net_sync = true; net_iface = ""; show_battery = true; selected_battery = "Auto"; log_level = "WARNING"; }; themes = { global = '' theme[main_bg]="${palette.colors.bg}" theme[main_fg]="${palette.colors.text}" theme[title]="${palette.colors.text}" theme[hi_fg]="${palette.colors.info}" theme[selected_bg]="${palette.colors.bgAlt}" theme[selected_fg]="${palette.colors.info}" theme[inactive_fg]="${palette.colors.surfaceAlt}" theme[graph_text]="${palette.colors.text}" theme[meter_bg]="${palette.colors.bgAlt}" theme[proc_misc]="${palette.colors.text}" theme[cpu_box]="${palette.colors.accent}" theme[mem_box]="${palette.colors.success}" theme[net_box]="${palette.colors.warning}" theme[proc_box]="${palette.colors.danger}" theme[div_line]="${palette.colors.bgAlt}" theme[temp_start]="${palette.colors.success}" theme[temp_mid]="${palette.colors.warning}" theme[temp_end]="${palette.colors.danger}" theme[cpu_start]="${palette.colors.accent}" theme[cpu_mid]="${palette.colors.warning}" theme[cpu_end]="${palette.colors.danger}" theme[free_start]="${palette.colors.success}" theme[free_mid]="${palette.colors.warning}" theme[free_end]="${palette.colors.warning}" theme[cached_start]="${palette.colors.success}" theme[cached_mid]="${palette.colors.warning}" theme[cached_end]="${palette.colors.warning}" theme[available_start]="${palette.colors.text}" theme[available_mid]="${palette.colors.danger}" theme[available_end]="${palette.colors.danger}" theme[used_start]="${palette.colors.success}" theme[used_mid]="${palette.colors.warning}" theme[used_end]="${palette.colors.danger}" theme[download_start]="${palette.colors.info}" theme[download_mid]="${palette.colors.info}" theme[download_end]="${palette.colors.warning}" theme[upload_start]="${palette.colors.info}" theme[upload_mid]="${palette.colors.info}" theme[upload_end]="${palette.colors.warning}" theme[process_start]="${palette.colors.accent}" theme[process_mid]="${palette.colors.warning}" theme[process_end]="${palette.colors.danger}" ''; }; }; }; }