diff --git a/docs/glances-doc.rst b/docs/glances-doc.rst index 65377b34..4f1d4d2e 100644 --- a/docs/glances-doc.rst +++ b/docs/glances-doc.rst @@ -149,6 +149,7 @@ Command-Line Options --disable-log disable log module --enable-process-extended enable extended stats on top process + --disable-quicklook disable the Quicklook module --enable-history enable the history mode --path-history PATH_HISTORY Set the export path for graph history @@ -263,6 +264,8 @@ The following commands (key pressed) are supported while in Glances: Switch between global CPU and per-CPU stats ``2`` Enable/disable left sidebar +``3`` + Enable/disable the Quicklook module ``/`` Switch between short name / command line (processes name) diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index 42e3f885..7d7ca514 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -249,6 +249,9 @@ class _GlancesCurses(object): elif self.pressedkey == ord('2'): # '2' > Enable/disable left sidebar self.args.disable_left_sidebar = not self.args.disable_left_sidebar + elif self.pressedkey == ord('3'): + # '3' > Enable/disable quicklook + self.args.disable_quicklook = not self.args.disable_quicklook elif self.pressedkey == ord('/'): # '/' > Switch between short/long name for processes self.args.process_short_name = not self.args.process_short_name @@ -494,7 +497,7 @@ class _GlancesCurses(object): # CPU | PERCPU if self.args.percpu: cpu_width = self.get_stats_display_width(stats_percpu) - quicklook_adapt = 116 + quicklook_adapt = 114 else: cpu_width = self.get_stats_display_width(stats_cpu, without_option=(screen_x < 80)) quicklook_adapt = 108 @@ -504,7 +507,7 @@ class _GlancesCurses(object): l += self.get_stats_display_width(stats_memswap) l += self.get_stats_display_width(stats_load) # Quicklook plugin size is dynamic - if screen_x > 126: + if screen_x > 126 and not self.args.disable_quicklook: # Limit the size to be align with the process quicklook_width = min(screen_x - quicklook_adapt, 87) try: diff --git a/glances/plugins/glances_help.py b/glances/plugins/glances_help.py index bf1f18f6..4bd895ad 100644 --- a/glances/plugins/glances_help.py +++ b/glances/plugins/glances_help.py @@ -141,7 +141,10 @@ class Plugin(GlancesPlugin): ret.append(self.curse_add_line(msg)) ret.append(self.curse_new_line()) msg = msg_col.format("D", _("Enable/disable Docker stats")) - ret.append(self.curse_add_line(msg)) + ret.append(self.curse_add_line(msg)) + ret.append(self.curse_new_line()) + msg = msg_col.format("3", _("Enable/disable Quicklook plugin")) + ret.append(self.curse_add_line(msg)) ret.append(self.curse_new_line())