summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Richardson <weaselkeeper@gmail.com>2014-03-14 15:48:10 -0700
committerJim Richardson <weaselkeeper@gmail.com>2014-03-14 15:48:10 -0700
commitad5bfecbf92d63982df9d8e6d5a32bf90abec599 (patch)
treef219c64514a681b031121b52552c0f7487751e5b
parentbfa9089e5f2540b0762a4b3a23d6c24534045f16 (diff)
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.
-rw-r--r--glances/glances.py3
1 files changed, 3 insertions, 0 deletions
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')