xref: /freebsd/stand/lua/screen.lua.8 (revision 02ba1d993fa905b059fc044cac30123f6e29ad38)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
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.\" $FreeBSD$
28.\"
29.Dd August 19, 2018
30.Dt SCREEN.LUA 8
31.Os
32.Sh NAME
33.Nm screen.lua
34.Nd FreeBSD screen manipulation module
35.Sh DESCRIPTION
36.Nm
37contains functionality for manipulating the screen.
38This includes functionality such as clearing the screen, moving the cursor, and
39setting foreground/background colors using sequences provided by
40.Xr color.lua 8 .
41.Pp
42Before using the functionality provided by
43.Nm ,
44it must be included with a statement such as the following:
45.Pp
46.Dl local screen = require("screen")
47.Pp
48The following variables are exported from
49.Nm :
50.Bl -tag -width "Ic screen.default_x" -offset indent
51.It Ic screen.default_x
52The x component of the default cursor position.
53.It Ic screen.default_y
54The y component of the default cursor position.
55.El
56.Pp
57The following functions are exported from
58.Nm :
59.Bl -tag -width "Fn screen.clear" -offset indent
60.It Fn screen.clear
61Clears the screen.
62.Fn screen.clear
63will do nothing if a serial boot is detected.
64.It Fn screen.setcursor x y
65Sets the cursor position to
66.Fa x ,
67.Fa y .
68.Fn screen.setcursor
69will do nothing if a serial boot is detected.
70.It Fn screen.setforeground color_value
71Sets the foreground color to
72.Fa color_value ,
73which should be a constant defined in
74.Xr color.lua 8 .
75.Fn screen.setforeground
76will do nothing if color is disabled.
77.It Fn screen.setbackground color_value
78Sets the background color to
79.Fa color_value ,
80which should be a constant defined in
81.Xr color.lua 8 .
82.Fn screen.setbackground
83will do nothing if color is disabled.
84.It Fn screen.defcolor
85Sets the default color scheme, as defined by
86.Fn color.default .
87.Fn screen.defcolor
88will do nothing if color is disabled.
89.It Fn screen.defcursor
90Sets the default cursor position to that defined by
91.Ic screen.default_x ,
92.Ic screen.default_y .
93.El
94.Sh SEE ALSO
95.Xr color.lua 8
96.Sh AUTHORS
97The
98.Nm
99file was originally written by
100.An Pedro Souza Aq Mt pedrosouza@FreeBSD.org .
101Later work and this manual page was done by
102.An Kyle Evans Aq Mt kevans@FreeBSD.org .
103