From: Stefan Raspl Date: Fri, 10 Mar 2017 12:40:00 +0000 (+0100) Subject: tools/kvm_stat: hide cursor X-Git-Tag: v4.13~783^2~87 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=a0b4e6a0325e325d91901342dd436d917da0ddd6;p=mirror_ubuntu-bionic-kernel.git tools/kvm_stat: hide cursor When running kvm_stat in interactive mode, the cursor appears at the lower left corner, which looks a bit distracting. This patch hides the cursor by turning it invisible. Signed-off-by: Stefan Raspl Reviewed-By: Sascha Silbe Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář --- diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat index 581278c58488..8cc83a309e65 100755 --- a/tools/kvm/kvm_stat/kvm_stat +++ b/tools/kvm/kvm_stat/kvm_stat @@ -812,6 +812,13 @@ class Tui(object): except: pass + # Hide cursor in extra statement as some monochrome terminals + # might support hiding but not colors. + try: + curses.curs_set(0) + except curses.error: + pass + curses.use_default_colors() return self