public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bsd-style cursor
@ 2000-12-13 23:51 Lennert Buytenhek
  2000-12-14  1:43 ` James Simmons
  0 siblings, 1 reply; 4+ messages in thread
From: Lennert Buytenhek @ 2000-12-13 23:51 UTC (permalink / raw)
  To: linux-kernel


Hi,

included a patch against 2.4.0-test9 (should apply against latest but
haven't checked) which adds the config option to have a bsd-style cursor
in VT's by default. I was hoping it might be considered for inclusion so
that I don't have to patch it in myself every time :-)


cheers,
Lennert


--- linux-2.4.0-test9vm/include/linux/console_struct.h.old	Fri Dec  8 11:37:47 2000
+++ linux-2.4.0-test9vm/include/linux/console_struct.h	Fri Dec  8 11:37:29 2000
@@ -9,6 +9,8 @@
  * to achieve effects such as fast scrolling by changing the origin.
  */

+#include <linux/config.h>
+
 #define NPAR 16

 struct vc_data {
@@ -104,6 +106,10 @@
 #define CUR_HWMASK	0x0f
 #define CUR_SWMASK	0xfff0

+#ifndef CONFIG_VT_BSD_CURSOR
 #define CUR_DEFAULT CUR_UNDERLINE
+#else
+#define CUR_DEFAULT 0x7f11
+#endif

 #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
--- linux-2.4.0-test9vm/drivers/char/Config.in.old	Fri Dec  8 11:38:29 2000
+++ linux-2.4.0-test9vm/drivers/char/Config.in	Fri Dec  8 11:38:24 2000
@@ -7,6 +7,7 @@
 bool 'Virtual terminal' CONFIG_VT
 if [ "$CONFIG_VT" = "y" ]; then
    bool '  Support for console on virtual terminal' CONFIG_VT_CONSOLE
+   bool '  BSD-style cursor' CONFIG_VT_BSD_CURSOR
 fi
 tristate 'Standard/generic (8250/16550 and compatible UARTs) serial support' CONFIG_SERIAL
 if [ "$CONFIG_SERIAL" = "y" ]; then
--- linux-2.4.0-test9vm/arch/i386/defconfig.old	Fri Dec  8 11:39:19 2000
+++ linux-2.4.0-test9vm/arch/i386/defconfig	Fri Dec  8 11:38:57 2000
@@ -450,6 +450,7 @@
 #
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
+# CONFIG_VT_BSD_CURSOR is not set
 CONFIG_SERIAL=y
 # CONFIG_SERIAL_CONSOLE is not set
 # CONFIG_SERIAL_EXTENDED is not set
--- linux-2.4.0-test9vm/Documentation/Configure.help.old	Fri Dec  8 11:40:47 2000
+++ linux-2.4.0-test9vm/Documentation/Configure.help	Fri Dec  8 11:43:43 2000
@@ -11931,6 +11931,13 @@

   If unsure, say Y.

+BSD-style cursor
+CONFIG_VT_BSD_CURSOR
+  If you say Y here, the cursor style for virtual terminals will default to
+  a non-blinking block (BSD-style).
+
+  If you have a strong dislike of BSD, say N here.
+
 Support for PowerMac keyboard
 CONFIG_MAC_KEYBOARD
   This option allows you to use an ADB keyboard attached to your

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bsd-style cursor
  2000-12-13 23:51 Lennert Buytenhek
@ 2000-12-14  1:43 ` James Simmons
  2000-12-14  1:49   ` Lennert Buytenhek
  0 siblings, 1 reply; 4+ messages in thread
From: James Simmons @ 2000-12-14  1:43 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: linux-kernel


> included a patch against 2.4.0-test9 (should apply against latest but
> haven't checked) which adds the config option to have a bsd-style cursor
> in VT's by default. I was hoping it might be considered for inclusion so
> that I don't have to patch it in myself every time :-)

How about placing  

   echo '\033[?17;120c'  

In one of your startup scripts. This will give you this nice BSD cursor
you like.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bsd-style cursor
  2000-12-14  1:43 ` James Simmons
@ 2000-12-14  1:49   ` Lennert Buytenhek
  0 siblings, 0 replies; 4+ messages in thread
From: Lennert Buytenhek @ 2000-12-14  1:49 UTC (permalink / raw)
  To: James Simmons; +Cc: linux-kernel



On Wed, 13 Dec 2000, James Simmons wrote:

> > included a patch against 2.4.0-test9 (should apply against latest but
> > haven't checked) which adds the config option to have a bsd-style cursor
> > in VT's by default. I was hoping it might be considered for inclusion so
> > that I don't have to patch it in myself every time :-)
>
> How about placing
>
>    echo '\033[?17;120c'
>
> In one of your startup scripts. This will give you this nice BSD
> cursor you like.

[buytenh@mara buytenh]$ tail -1 ~/.bash_profile
echo -e -n '\033[?17;127c'
[buytenh@mara buytenh]$

This has Issues though: try entering vi for example.

I'd just like a way of altering CUR_DEFAULT (which is hardcoded here and
there); sysctl would be fine too for that matter.


cheers,
Lennert

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bsd-style cursor
       [not found] <6313347DCD663344A7658E90E56201C209B1A9@2kmail.calific.com>
@ 2000-12-14  4:05 ` Markus Gutschke
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Gutschke @ 2000-12-14  4:05 UTC (permalink / raw)
  To: linux-kernel

Lennert Buytenhek wrote:
> On Wed, 13 Dec 2000, James Simmons wrote: 
> > How about placing 
> >  echo '\033[?17;120c' 
> > In one of your startup scripts. This will give you this nice BSD 
> > cursor you like. 
> 
> [ buytenh@mara buytenh]$ tail -1 ~/.bash_profile 
> echo -e -n '\033[?17;127c' 
> [buytenh@mara buytenh]$ 
> 
> This has Issues though: try entering vi for example. 

My /etc/inittab has lines that look like this:

  1:2345:respawn:/sbin/getty 38400 tty1 -I '^[c^[[?17;55;248c'

This gives me a nice red non-blinking cursor. No problems with vi
whatsoever. Of course, this only works on the console, but for my
terminal windows, I can set these values in resource or configuration
files. So, all of this is a user-space problem. No need to complicate
the kernel code.


Markus

-- 
Markus Gutschke                                Resonate, Inc.
3637 Fillmore Street #106                      385 Moffett Park Drive
San Francisco, CA 94123-1600                   Sunnyvale, CA 94089
+1-415-567-8449                                +1-408-548-5528
markus@gutschke.com                            mgutschk@resonate.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-12-14  4:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <6313347DCD663344A7658E90E56201C209B1A9@2kmail.calific.com>
2000-12-14  4:05 ` [PATCH] bsd-style cursor Markus Gutschke
2000-12-13 23:51 Lennert Buytenhek
2000-12-14  1:43 ` James Simmons
2000-12-14  1:49   ` Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox