mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH] defaultenv: Unblank cursor at startup
Date: Sun, 24 Jul 2016 08:58:29 +0300	[thread overview]
Message-ID: <1469339909-3667-1-git-send-email-shc_work@mail.ru> (raw)

In some cases, the user program can disable the cursor,
for example, Qt4 library do this, so the cursor remains invisible
after the restart.
The patch adds a command to activate the cursor,
by sending DECTECM command to the terminal.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 defaultenv/defaultenv-1/bin/init      | 2 +-
 defaultenv/defaultenv-2-base/bin/init | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/defaultenv/defaultenv-1/bin/init b/defaultenv/defaultenv-1/bin/init
index 4781b5a..a55d293 100644
--- a/defaultenv/defaultenv-1/bin/init
+++ b/defaultenv/defaultenv-1/bin/init
@@ -22,10 +22,10 @@ if [ -f /env/bin/init_board ]; then
 	. /env/bin/init_board
 fi
 
+echo -e "\e[?25h"
 if [ -f /env/bin/boot_board ]; then
 	. /env/bin/boot_board
 elif [ -n $autoboot_timeout ]; then
-	echo
 	echo -n "Hit any key to stop autoboot: "
 	timeout -a $autoboot_timeout
 	if [ $? != 0 ]; then
diff --git a/defaultenv/defaultenv-2-base/bin/init b/defaultenv/defaultenv-2-base/bin/init
index 37ee365..7af3c7d 100644
--- a/defaultenv/defaultenv-2-base/bin/init
+++ b/defaultenv/defaultenv-2-base/bin/init
@@ -32,6 +32,7 @@ magicvar -a global.allow_color "Allow color on the console (boolean)"
 timeout -s -a -v key 0
 autoboot="$?"
 
+echo -e -n "\e[?25h"
 if [ "${key}" = "q" ]; then
 	exit
 fi
-- 
2.7.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2016-07-24  5:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-24  5:58 Alexander Shiyan [this message]
2016-08-03  5:43 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469339909-3667-1-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox