xref: /freebsd/stand/lua/screen.lua.8 (revision 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
175658c96SKyle Evans.\"
2*4d846d26SWarner Losh.\" SPDX-License-Identifier: BSD-2-Clause
375658c96SKyle Evans.\"
475658c96SKyle Evans.\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org>
575658c96SKyle Evans.\"
675658c96SKyle Evans.\" Redistribution and use in source and binary forms, with or without
775658c96SKyle Evans.\" modification, are permitted provided that the following conditions
875658c96SKyle Evans.\" are met:
975658c96SKyle Evans.\" 1. Redistributions of source code must retain the above copyright
1075658c96SKyle Evans.\"    notice, this list of conditions and the following disclaimer.
1175658c96SKyle Evans.\" 2. Redistributions in binary form must reproduce the above copyright
1275658c96SKyle Evans.\"    notice, this list of conditions and the following disclaimer in the
1375658c96SKyle Evans.\"    documentation and/or other materials provided with the distribution.
1475658c96SKyle Evans.\"
1575658c96SKyle Evans.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1675658c96SKyle Evans.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1775658c96SKyle Evans.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1875658c96SKyle Evans.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1975658c96SKyle Evans.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2075658c96SKyle Evans.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2175658c96SKyle Evans.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2275658c96SKyle Evans.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2375658c96SKyle Evans.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2475658c96SKyle Evans.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2575658c96SKyle Evans.\" SUCH DAMAGE.
2675658c96SKyle Evans.\"
2775658c96SKyle Evans.\" $FreeBSD$
2875658c96SKyle Evans.\"
2975658c96SKyle Evans.Dd August 19, 2018
3075658c96SKyle Evans.Dt SCREEN.LUA 8
3175658c96SKyle Evans.Os
3275658c96SKyle Evans.Sh NAME
3375658c96SKyle Evans.Nm screen.lua
3475658c96SKyle Evans.Nd FreeBSD screen manipulation module
3575658c96SKyle Evans.Sh DESCRIPTION
3675658c96SKyle Evans.Nm
3775658c96SKyle Evanscontains functionality for manipulating the screen.
3875658c96SKyle EvansThis includes functionality such as clearing the screen, moving the cursor, and
3975658c96SKyle Evanssetting foreground/background colors using sequences provided by
4075658c96SKyle Evans.Xr color.lua 8 .
4175658c96SKyle Evans.Pp
4275658c96SKyle EvansBefore using the functionality provided by
4375658c96SKyle Evans.Nm ,
4475658c96SKyle Evansit must be included with a statement such as the following:
4575658c96SKyle Evans.Pp
4675658c96SKyle Evans.Dl local screen = require("screen")
4775658c96SKyle Evans.Pp
4875658c96SKyle EvansThe following variables are exported from
4975658c96SKyle Evans.Nm :
5075658c96SKyle Evans.Bl -tag -width "Ic screen.default_x" -offset indent
5175658c96SKyle Evans.It Ic screen.default_x
5275658c96SKyle EvansThe x component of the default cursor position.
5375658c96SKyle Evans.It Ic screen.default_y
5475658c96SKyle EvansThe y component of the default cursor position.
5575658c96SKyle Evans.El
5675658c96SKyle Evans.Pp
5775658c96SKyle EvansThe following functions are exported from
5875658c96SKyle Evans.Nm :
5975658c96SKyle Evans.Bl -tag -width "Fn screen.clear" -offset indent
6075658c96SKyle Evans.It Fn screen.clear
6175658c96SKyle EvansClears the screen.
6275658c96SKyle Evans.Fn screen.clear
6375658c96SKyle Evanswill do nothing if a serial boot is detected.
6475658c96SKyle Evans.It Fn screen.setcursor x y
6575658c96SKyle EvansSets the cursor position to
6675658c96SKyle Evans.Fa x ,
6775658c96SKyle Evans.Fa y .
6875658c96SKyle Evans.Fn screen.setcursor
6975658c96SKyle Evanswill do nothing if a serial boot is detected.
7075658c96SKyle Evans.It Fn screen.setforeground color_value
7175658c96SKyle EvansSets the foreground color to
7275658c96SKyle Evans.Fa color_value ,
7375658c96SKyle Evanswhich should be a constant defined in
7475658c96SKyle Evans.Xr color.lua 8 .
7575658c96SKyle Evans.Fn screen.setforeground
7675658c96SKyle Evanswill do nothing if color is disabled.
7775658c96SKyle Evans.It Fn screen.setbackground color_value
7875658c96SKyle EvansSets the background color to
7975658c96SKyle Evans.Fa color_value ,
8075658c96SKyle Evanswhich should be a constant defined in
8175658c96SKyle Evans.Xr color.lua 8 .
8275658c96SKyle Evans.Fn screen.setbackground
8375658c96SKyle Evanswill do nothing if color is disabled.
8475658c96SKyle Evans.It Fn screen.defcolor
8575658c96SKyle EvansSets the default color scheme, as defined by
8675658c96SKyle Evans.Fn color.default .
8775658c96SKyle Evans.Fn screen.defcolor
8875658c96SKyle Evanswill do nothing if color is disabled.
8975658c96SKyle Evans.It Fn screen.defcursor
9075658c96SKyle EvansSets the default cursor position to that defined by
9175658c96SKyle Evans.Ic screen.default_x ,
9275658c96SKyle Evans.Ic screen.default_y .
9375658c96SKyle Evans.El
9475658c96SKyle Evans.Sh SEE ALSO
9575658c96SKyle Evans.Xr color.lua 8
9675658c96SKyle Evans.Sh AUTHORS
9775658c96SKyle EvansThe
9875658c96SKyle Evans.Nm
9975658c96SKyle Evansfile was originally written by
10075658c96SKyle Evans.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org .
10175658c96SKyle EvansLater work and this manual page was done by
10275658c96SKyle Evans.An Kyle Evans Aq Mt kevans@FreeBSD.org .
103