Add sort on the Bootle interface

pull/354/head
Nicolas Hennion 2014-04-11 20:59:25 +02:00
parent 05533c1c01
commit 54365fa849
4 changed files with 5 additions and 3 deletions

View File

@ -63,6 +63,7 @@ class glancesBottle:
'DEFAULT': '',
'UNDERLINE': 'underline',
'BOLD': 'bold',
'SORT': 'sort',
'OK': 'ok',
'TITLE': 'title',
'CAREFUL': 'careful',

View File

@ -124,6 +124,7 @@ class glancesCurses:
'DEFAULT': self.no_color,
'UNDERLINE': curses.A_UNDERLINE,
'BOLD': A_BOLD,
'SORT': A_BOLD,
'OK': self.default_color2,
'TITLE': self.title_color,
'CAREFUL': self.ifCAREFUL_color2,

View File

@ -107,7 +107,7 @@ class Plugin(GlancesPlugin):
try:
args.process_sorted_by
except AttributeError:
args.process_sorted_by = 'cpu_percent'
args.process_sorted_by = glances_processes.getsortkey()
if (args.process_sorted_by == 'auto'):
msg = "{0}".format(_("sorted automatically"))
ret.append(self.curse_add_line(msg))

View File

@ -75,12 +75,12 @@ class Plugin(GlancesPlugin):
try:
args.process_sorted_by
except AttributeError:
args.process_sorted_by = 'cpu_percent'
args.process_sorted_by = glances_processes.getsortkey()
if (args.process_sorted_by == 'auto'):
process_sort_key = glances_processes.getsortkey()
else:
process_sort_key = args.process_sorted_by
sort_style = 'BOLD'
sort_style = 'SORT'
# Header
msg = "{0:15}".format(" ")