-
Notifications
You must be signed in to change notification settings - Fork 12
/
srandrd.1
173 lines (172 loc) · 3.48 KB
/
srandrd.1
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
'\" t
.\" Title: srandrd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 10/13/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "SRANDRD" "1" "10/13/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
srandrd \- simple randr daemon
.SH "SYNOPSIS"
.sp
\fBsrandrd\fR [\fIOPTIONS\fR] \fICOMMAND|list\fR
.PP
\fBlist\fR
.RS 4
List outputs and EDIDs and terminate
.RE
.SH "OPTIONS"
.PP
\fB\-h\fR
.RS 4
Print help and exit
.RE
.PP
\fB\-n\fR
.RS 4
Don\(cqt fork to background
.RE
.PP
\fB\-V\fR
.RS 4
Show version information and exit
.RE
.PP
\fB\-v\fR
.RS 4
Verbose output
.RE
.PP
\fB\-e\fR
.RS 4
Emit connected devices at startup
.RE
.PP
\fB\-1\fR
.RS 4
One\-shot mode; exit after emitting connected devices (implies
\fB\-e\fR)
.RE
.SH "DESCRIPTION"
.sp
srandrd(1) is a tool that executes a command on xrandr output change events, i\&.e\&. if a monitor is plugged or unplugged\&. By default srandrd forks to background and exits if the xserver exits\&.
.sp
The following variables are defined:
.sp
\fISRANDRD_OUTPUT\fR defines the name of the graphics card output / port that triggered the event, e\&.g\&. \fIDVI\-0\fR\&.
.sp
\fISRANDRD_EVENT\fR defines the event that happened\&. It\(cqs one of the following:
.sp
.if n \{\
.RS 4
.\}
.nf
[connected|disconnected|unknown]
.fi
.if n \{\
.RE
.\}
.sp
\fISRANDRD_EDID\fR defines a semi\-unique identifier of the monitor that has been connected\&. The identifier is usually not unique (the same) within a monitor series\&. The identifier has this format:
.sp
.if n \{\
.RS 4
.\}
.nf
VENDOR[4]PRODUCT[4]SERIAL[8]
.fi
.if n \{\
.RE
.\}
.sp
\fISRANDRD_SCREENID\fR defines the xinerama screen id (if available)\&. The identifier has this format:
.sp
.if n \{\
.RS 4
.\}
.nf
XINERAMA_SCREENID[1\&.\&.n]
.fi
.if n \{\
.RE
.\}
.SH "EXAMPLE"
.sp
An example usage could be
.sp
.if n \{\
.RS 4
.\}
.nf
srandrd display_handler
.fi
.if n \{\
.RE
.\}
.sp
where display_handler being the following script
.sp
.if n \{\
.RS 4
.\}
.nf
#!/bin/sh
case "$S{RANDRD_OUTPUT} ${SRANDRD_EVENT}" in
"DVI\-0 connected") xrandr \-\-output DVI\-0 \-\-auto \-\-right\-of LVDS;;
"VGA\-0 connected") xrandr \-\-output VGA\-0 \-\-auto \-\-left\-of LVDS;;
esac
.fi
.if n \{\
.RE
.\}
.SH "RESOURCES"
.sp
github: https://github\&.com/jceb/srandrd
.SH "RELATED"
.sp
screenconfig: https://github\&.com/jceb/screenconfig
.SH "AUTHOR"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Jan Christoph Ebersbach <jceb@e\-jc\&.de>
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Stefan Bolte <portix@gmx\&.net>
.RE