From ad5bfecbf92d63982df9d8e6d5a32bf90abec599 Mon Sep 17 00:00:00 2001 From: Jim Richardson Date: Fri, 14 Mar 2014 15:48:10 -0700 Subject: [PATCH] Implement toggle of process list display Parsing and displaying the process list takes a sometimes significant amount of resources. Since there is already a mechanism in place to run glances with the process list disabled, it was easy to add a toggle to the __catchKey function. --- glances/glances.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glances/glances.py b/glances/glances.py index ea64b34a..14785efa 100644 --- a/glances/glances.py +++ b/glances/glances.py @@ -2511,6 +2511,9 @@ class glancesScreen: elif self.pressedkey == ord('n') and network_tag: # 'n' > Show/hide network stats self.network_tag = not self.network_tag + elif self.pressedkey == ord('z'): + # 'z' > Show/Hide process list + self.process_tag = not self.process_tag elif self.pressedkey == ord('p'): # 'p' > Sort processes by name self.setProcessSortedBy('name')