aboutsummaryrefslogtreecommitdiff
path: root/jsmond.1
blob: 1ab07d71091359b451426e5e6fdef14367d52340 (plain)
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
.\" Man page generated from reStructuredText.
.
.TH JSMOND 1 "2020-05-16" "0.1.0" "Urchlay"
.SH NAME
jsmond \- deactivate screensaver on joystick activity
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" RST source for jsmond(1) man page. Convert with:
.
.\" rst2man.py jsmond.rst > jsmond.1
.
.SH SYNOPSIS
.sp
jsmond [\fB\-c command\fP] [\fB\-i seconds\fP] [\fB\-d\fP] [\fB\-x\fP] [\fBjoydev [joydev ...]\fP]
.SH DESCRIPTION
.sp
jsmond lets you play games with your joysticks/gamepads without
xscreensaver activating due to lack of keyboard/mouse input.
.sp
Multiple joystick devices can be monitored. By default, jsmond
monitors up to 16 devices, named /dev/input/js0 through js15.
These devices don\(aqt have to actually exist: they can come and go
as joysticks are plugged in and unplugged.
.sp
Every \fIinterval\fP seconds (60, or whatever \fB\-i\fP is set to), jsmond
checks to see if there\(aqs been any activity on any of the devices it\(aqs
monitoring. If so, it runs the \fBxscreensaver\-command \-deactivate\fP
(or whatever the \fB\-c\fP argument is set to). The command will be run no
more than once every \fIinterval\fP seconds.
.sp
It\(aqs recommended to let jsmond find the joysticks itself. However,
you can pass one or more device names (or just numbers) if the default
doesn\(aqt do the right thing for you. In this case, only these devices
will be monitored (no search is done).
.SH OPTIONS
.INDENT 0.0
.TP
.B \-\-help
Print usage summary
.TP
.BI \-c \ <command>
Run <command> when activity was detected during the
last \fIinterval\fP\&.
.TP
.BI \-i \ <seconds>
Interval to check for activity. Should be set a minute or
so less than your xscreensaver timeout. Setting this too low
will waste resources. Default: 60.
.TP
.B \-d
Debug mode: run in foreground and print verbose messages.
.TP
.B \-x
Don\(aqt try to connect to X server (and don\(aqt exit until killed).
.UNINDENT
.SH NOTES
.sp
A space is required between an option and its argument, as shown
above. Use e.g. \fB\-i 120\fP, not \fB\-i120\fP\&.
.sp
By default, jsmond searches for and monitors all the joysticks it can
find, up to MAX_STICKS (normally 16; see the \fB\-\-help\fP output to find
the compiled\-in default). You can override the search on the command
line by providing one or more \fBjoydev\fP arguments, in which case only
those devices will be monitored.
.sp
\fBjoydev\fP arguments can be either a path to a device node (e.g.
\fI/dev/input/js0\fP or similar), or a number, which will have the default
device basename prepended to it. This is normally "/dev/input/js", but
can be changed at compile time (see the \fB\-\-help\fP output to find the
compiled\-in default).
.sp
Note that it\(aqs \fInot\fP an error to give nonexistent joystick device names.
jsmond will wait for devices to come into existence (e.g. as created
by \fBudev\fP).
.sp
jsmond should be started from your \fB\&.xinitrc\fP or whatever X startup
script your windowmanager or desktop environment uses. By default, it
will exit when the X server does.
.sp
If you can think of a use for jsmond outside of X, give it the \-x argument
so it won\(aqt complain about not being able to connect to the X server. This
will also prevent it from exiting when the X server does. When using
\-x, be careful not to spawn multiple instances of jsmond (although they
won\(aqt hurt anything, just waste resources).
.sp
There\(aqs no PID file. Just use "pkill jsmond".
.SH EXIT STATUS
.sp
Without the \-d option, the exit status is 0 (success) if jsmond
successfully forked into the background.
.sp
A non\-zero exit status means an error in the command line arguments,
or else fork() failed. No daemon will be running in this case.
.sp
With the \-d option, jsmond never exits until it\(aqs killed.
.SH BUGS
.sp
There\(aqs no way to distinguish between an invalid device name and a
device name that doesn\(aqt happen to exist yet because its device hasn\(aqt
been plugged in yet. Try to avoid typos, if you really have to use device
names (better to autodetect).
.sp
jsmond isn\(aqt portable. It only works on Linux, at least for now.
.\" EXAMPLES
.
.\" ========
.
.SH LICENSE
.sp
jsmond is released under the WTFPL: Do WTF you want with this.
.SH AUTHOR
.sp
jsmond was written by B. Watson <\fI\%yalhcru@gmail.com\fP>.
.SH SEE ALSO
.sp
jstest(1), jscal(1), sdl\-jstest(1), sdl2\-jstest(2)
.\" Generated by docutils manpage writer.
.