aboutsummaryrefslogtreecommitdiffstats
path: root/vtchs.1
blob: 65fd571acd0a2c749a286c02e90ec14e66bce8c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.TH VTCHS 1 VTCHS
.SH NAME
vtchs \- Listen for VT switches
.SH ETYMOLOGY
.IR v irtual
.IR t erminal
.IR ch ange s
.SH SYNOPSIS
.B vtchs
.SH DESCRIPTION
.B vtchs
ignores all arguments. You must have set
stdin to be a
.B /dev/tty
device.
.PP
When
.B vtchs
starts, it prints the number of the
currently active console. Then, in an infinite
loop, it waits for the user to change console,
and prints the number of the newly active console
when this happens.
.SH RATIONALE
Sometimes you need to be able to know which
console is in the foreground, and stay up to
date on this. In particular, I want to be able
to record the output on the mintors, and have
it detect VT switches, so it can select the
appropriate method and display; and I want to
be able to have VT dependent colour adjustments.
.SH SEE ALSO
.BR fgconsole (1),
.BR chvt (1)
.SH AUTHORS
Mattias Andrée
.RI < m@maandree.se >