Merge pull request #2023 from RazCrimson/fix-n-key-wrong-behaviour

Fix N key wrong behavior
This commit is contained in:
Nicolas Hennion 2022-04-08 08:56:12 +02:00 committed by GitHub
commit a72cbde480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,7 @@ class Plugin(GlancesPlugin):
self.view_data['show_hide_filesystem'] = msg_col.format('f', 'Show/hide filesystem stats')
self.view_data['view_cumulative_network'] = msg_col2.format('U', 'View cumulative network I/O')
self.view_data['show_hide_network'] = msg_col.format('n', 'Show/hide network stats')
self.view_data['show_hide_time'] = msg_col.format('N', 'Show/hide current time')
self.view_data['show_hide_filesytem_freespace'] = msg_col2.format('F', 'Show filesystem free space')
self.view_data['show_hide_sensors'] = msg_col.format('s', 'Show/hide sensors stats')
self.view_data['generate_graphs'] = msg_col2.format('g', 'Generate graphs for current history')

View File

@ -69,6 +69,9 @@ class Plugin(GlancesPlugin):
# Init the return message
ret = []
if not self.stats or self.is_disabled():
return ret
# Build the string message
# 23 is the padding for the process list
msg = '{:23}'.format(self.stats)