From 51ca74549e6d11c833ef5bcdd11af0da051069e0 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Wed, 24 Feb 2021 19:24:56 +0100 Subject: [PATCH] bundles/basic: add htoprc --- bundles/basic/files/htoprc | 39 ++++++++++++++++++++++++++++++++++++++ bundles/basic/items.py | 3 +++ bundles/basic/metadata.py | 3 +++ 3 files changed, 45 insertions(+) create mode 100644 bundles/basic/files/htoprc diff --git a/bundles/basic/files/htoprc b/bundles/basic/files/htoprc new file mode 100644 index 0000000..5db430c --- /dev/null +++ b/bundles/basic/files/htoprc @@ -0,0 +1,39 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +fields=0 48 17 18 38 39 40 2 46 47 49 1 +sort_key=46 +sort_direction=1 +tree_sort_key=0 +tree_sort_direction=1 +hide_kernel_threads=1 +hide_userland_threads=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=1 +highlight_megabytes=0 +highlight_threads=1 +highlight_changes=0 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=0 +tree_view=0 +tree_view_always_by_pid=0 +header_margin=1 +detailed_cpu_time=1 +cpu_count_from_one=1 +show_cpu_usage=1 +show_cpu_frequency=0 +show_cpu_temperature=0 +degree_fahrenheit=0 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=0 +enable_mouse=0 +delay=10 +left_meters=Hostname Tasks LoadAverage Uptime Memory CPU LeftCPUs +left_meter_modes=2 2 2 2 1 1 1 +right_meters=DiskIO NetworkIO Load RightCPUs +right_meter_modes=2 2 3 1 +hide_function_bar=0 diff --git a/bundles/basic/items.py b/bundles/basic/items.py index 420d695..e37b684 100644 --- a/bundles/basic/items.py +++ b/bundles/basic/items.py @@ -10,6 +10,9 @@ files = { '/etc/hosts': { 'content_type': 'mako', }, + '/etc/htoprc.global': { + 'source': 'htoprc', + }, '/etc/locale.gen': { 'content_type': 'mako', 'triggers': { diff --git a/bundles/basic/metadata.py b/bundles/basic/metadata.py index b28a554..29d666e 100644 --- a/bundles/basic/metadata.py +++ b/bundles/basic/metadata.py @@ -1,4 +1,7 @@ defaults = { + 'bash_functions': { + 'h': 'cp /etc/htoprc.global ~/.htoprc; mkdir -p ~/.config/htop; cp /etc/htoprc.global ~/.config/htop/htoprc; htop', + }, 'locale': { 'default': 'en_US.UTF-8', 'installed': {