From beffa30342dc667526c274e71f135c9863a56e61 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Tue, 17 Oct 2017 19:15:27 +0200 Subject: [PATCH 22/69] tools/kvm_stat: hide cursor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: David Hildenbrand Message-id: <20171017191605.2378-2-david@redhat.com> Patchwork-id: 77309 O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 01/39] tools/kvm_stat: hide cursor Bugzilla: 1497137 RH-Acked-by: Paolo Bonzini RH-Acked-by: Cornelia Huck RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Thomas Huth Upstream-status: linux.git a0b4e6a0325e325d91901342dd436d917da0ddd6 commit a0b4e6a0325e325d91901342dd436d917da0ddd6 Author: Stefan Raspl Date: Fri Mar 10 13:40:00 2017 +0100 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ář Signed-off-by: David Hildenbrand Signed-off-by: Miroslav Rezanina --- scripts/kvm/kvm_stat | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index 581278c..8cc83a3 100755 --- a/scripts/kvm/kvm_stat +++ b/scripts/kvm/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 -- 1.8.3.1