xref: /freebsd/stand/lua/screen.lua.8 (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause
3.\"
4.\" Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org>
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd August 19, 2018
28.Dt SCREEN.LUA 8
29.Os
30.Sh NAME
31.Nm screen.lua
32.Nd FreeBSD screen manipulation module
33.Sh DESCRIPTION
34.Nm
35contains functionality for manipulating the screen.
36This includes functionality such as clearing the screen, moving the cursor, and
37setting foreground/background colors using sequences provided by
38.Xr color.lua 8 .
39.Pp
40Before using the functionality provided by
41.Nm ,
42it must be included with a statement such as the following:
43.Pp
44.Dl local screen = require("screen")
45.Pp
46The following variables are exported from
47.Nm :
48.Bl -tag -width "Ic screen.default_x" -offset indent
49.It Ic screen.default_x
50The x component of the default cursor position.
51.It Ic screen.default_y
52The y component of the default cursor position.
53.El
54.Pp
55The following functions are exported from
56.Nm :
57.Bl -tag -width "Fn screen.clear" -offset indent
58.It Fn screen.clear
59Clears the screen.
60.Fn screen.clear
61will do nothing if a serial boot is detected.
62.It Fn screen.setcursor x y
63Sets the cursor position to
64.Fa x ,
65.Fa y .
66.Fn screen.setcursor
67will do nothing if a serial boot is detected.
68.It Fn screen.setforeground color_value
69Sets the foreground color to
70.Fa color_value ,
71which should be a constant defined in
72.Xr color.lua 8 .
73.Fn screen.setforeground
74will do nothing if color is disabled.
75.It Fn screen.setbackground color_value
76Sets the background color to
77.Fa color_value ,
78which should be a constant defined in
79.Xr color.lua 8 .
80.Fn screen.setbackground
81will do nothing if color is disabled.
82.It Fn screen.defcolor
83Sets the default color scheme, as defined by
84.Fn color.default .
85.Fn screen.defcolor
86will do nothing if color is disabled.
87.It Fn screen.defcursor
88Sets the default cursor position to that defined by
89.Ic screen.default_x ,
90.Ic screen.default_y .
91.El
92.Sh SEE ALSO
93.Xr color.lua 8
94.Sh AUTHORS
95The
96.Nm
97file was originally written by
98.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org .
99Later work and this manual page was done by
100.An Kyle Evans Aq Mt kevans@FreeBSD.org .
101