xterm: set mouse pointer type for ncurses

Matthias Apitz guru at unixarea.de
Mon May 22 09:14:46 UTC 2017


El día Monday, May 22, 2017 a las 04:49:28AM -0400, Thomas Dickey escribió:

> The "mouse pointer" in _xterm_ may be set via an X resource (unless it's
> using the cursor-theme stuff).  That's done via XDefineCursor().
> 
>        pointerShape (class Cursor)
>                Specifies the name of the shape of the pointer.  The default is
>                “xterm”.
> 
> Technically its color can be set using an escape sequence, but iirc the
> required support in the X server has been broken for a long time (due to
> some changes for acceleration).
> 
> By the way, being a "curses" question, it should have been directed to
> bug-ncurses (xorg won't provide any useful insight).
> 

There is an application to modify a xterm on the flight, 'xtermcontrol',
which supports:

$ xtermcontrol --help

Options:
  --fg=COLOR                          set foreground color
  --bg=COLOR                          set background color
  --colorN=COLOR                      set N'th [0-15] color
  --highlight=COLOR                   set highlight color
  --cursor=COLOR                      set cursor color
  --mouse-fg=COLOR                    set mouse pointer foreground color
  --mouse-bg=COLOR                    set mouse pointer background color
  --font=FONT                         set font
  --title=STRING                      set window title
  --geometry=WIDTHxHEIGHT+XOFF+YOFF   set size and/or position
  --get-fg                            report foreground color
  --get-bg                            report background color
  --get-colorN                        report N'th [0-15] color
  --get-highlight                     report highlight color
  --get-cursor                        report cursor color
  --get-mouse-fg                      report mouse pointer foreground
color
  --get-mouse-bg                      report mouse pointer background
color
  --get-font                          report font
  --get-title                         report window title
  --get-geometry                      report size and position
  --maximize                          maximize window
  --restore                           restore maximized window
  --iconify                           iconify window
  --de-iconify                        de-iconify window
  --raise                             raise window
  --lower                             lower window
  --reset                             full reset
  --raw=CTLSEQS                       issue raw control sequence
  --file=FILE                         alternative configuration file
  --force, -f                         skip TERM check
  --verbose, -v                       print verbose reports
  --help, -h                          print this help and exit
  --version                           print the version number and exit

I poked around a bit and it seems to work with just sending
ESC-sequences to STDOUT. One could dig into its source and check for
more details.

	matthias

-- 
Matthias Apitz               |  /"\   ASCII Ribbon Campaign:
E-mail: guru at unixarea.de     |  \ /   - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |   X    - No proprietary attachments
phone: +49-176-38902045      |  / \   - Respect for open standards
                             | en.wikipedia.org/wiki/ASCII_Ribbon_Campaign


More information about the xorg mailing list