diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-11-18 01:28:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 01:28:53 -0500 |
commit | 669b245367d194b7f4f7a12fe29573fcd9ca4e4e (patch) | |
tree | 5d4822751b16bf4a6b46a2995348ca90b6866152 /src/canvas.rs | |
parent | e43456207be0757fbb9c05f93a169063faf673b7 (diff) |
feature: Add collapsible tree entries (#304)
Adds collapsible trees to the tree mode for processes. These can be toggled via the + or - keys and the mouse by clicking on a selected entry.
Diffstat (limited to 'src/canvas.rs')
-rw-r--r-- | src/canvas.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/canvas.rs b/src/canvas.rs index 626f4f7f..7af29f33 100644 --- a/src/canvas.rs +++ b/src/canvas.rs @@ -25,6 +25,7 @@ use crate::{ options::Config, utils::error, utils::error::BottomError, + Pid, }; mod canvas_colours; @@ -46,9 +47,9 @@ pub struct DisplayableData { pub network_data_tx: Vec<Point>, pub disk_data: Vec<Vec<String>>, pub temp_sensor_data: Vec<Vec<String>>, - pub single_process_data: Vec<ConvertedProcessData>, // Contains single process data - pub finalized_process_data_map: HashMap<u64, Vec<ConvertedProcessData>>, // What's actually displayed - pub stringified_process_data_map: HashMap<u64, Vec<(Vec<(String, Option<String>)>, bool)>>, // Represents the row and whether it is disabled + pub single_process_data: HashMap<Pid, ConvertedProcessData>, // Contains single process data, key is PID + pub finalized_process_data_map: HashMap<u64, Vec<ConvertedProcessData>>, // What's actually displayed, key is the widget ID. + pub stringified_process_data_map: HashMap<u64, Vec<(Vec<(String, Option<String>)>, bool)>>, // Represents the row and whether it is disabled, key is the widget ID pub mem_label_percent: String, pub swap_label_percent: String, pub mem_label_frac: String, |