diff options
Diffstat (limited to 'jsmond.1')
-rw-r--r-- | jsmond.1 | 58 |
1 files changed, 44 insertions, 14 deletions
@@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH JSMOND 1 "2020-05-17" "0.2.0" "Urchlay" +.TH JSMOND 1 "2020-05-18" "0.2.0" "Urchlay" .SH NAME jsmond \- deactivate screensaver on joystick activity . @@ -36,7 +36,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] . .SH SYNOPSIS .sp -jsmond [\fB\-i interval\fP] [\fB\-k keycode\fP | \fB\-b button\fP] [\fB\-d dir\fP] [\fB\-j name\fP] [\fB\-D\fP] [\fBjoydev [joydev ...]\fP] +jsmond [\fB\-i interval[s|ms]\fP] [\fB\-m\fP | \fB\-k keycode\fP | \fB\-b button\fP] [\fB\-d dir\fP] [\fB\-j name\fP] [\fB\-D\fP] [\fBjoydev [joydev ...]\fP] .SH DESCRIPTION .sp jsmond lets you play games with your joysticks/gamepads without @@ -49,7 +49,7 @@ as joysticks are plugged in and unplugged. .sp Every \fIinterval\fP milliseconds (250, 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 sends a fake keystroke or mouse button click, which +monitoring. If so, it sends a fake mouse movement, keystroke, or mouse button click, which the screen saver will see as activity. .sp It\(aqs recommended to let jsmond find the joysticks itself. However, @@ -67,9 +67,12 @@ if you need to kill the daemon. .B \-\-help Print usage summary .TP -.BI \-i \ <millis> -Interval to check for activity, in milliseconds. -Default: 250. +.BI \-i \ <interval> +Interval to check for activity. Can be given in seconds +with \fIs\fP suffix (e.g. \fB1s\fP), or milliseconds with \fIm\fP +(e.g. \fB200m\fP). If just a number is given, it\(aqs assumed +to be in seconds if it\(aqs under 100, otherwise it\(aqs treated +as milliseconds. Default: 250m. .TP .BI \-k \ <keycode> Send this keycode when activity is detected. Default @@ -80,7 +83,24 @@ in your usual keymapping (use "xmodmap \-pk" to find one). .BI \-b \ <button> Send a click of this button when activity is detected, rather than a keystroke. Should be a button that -applications don\(aqt normally respond to (6 or higher). +applications don\(aqt normally respond to (6 or higher), +but in some environments, the window manager responds to +all the \(aqextra\(aq buttons as though they were button 1. +.TP +.B \-m +Send mouse movements rather than a keystroke. This will +move the pointer 10 pixels to the right and down, then +10 pixels to the left and up, then warp the pointer back +to its starting point. +.TP +.BI \-c \ <command> +Run a command when activity is detected, rather than +sending a fake keystroke/click/motion. It\(aqs recommended +to set \fIinterval\fP to at least 1 second, when using this +option. +.TP +.B \-x +Same as \fB\-c "xscreensaver\-command \-exit" \-i 1s\fP\&. .UNINDENT .sp These options are intended for developers and \fIreally\fP shouldn\(aqt be @@ -103,11 +123,14 @@ A space is required between an option and its argument, as shown above. Use e.g. \fB\-i 300\fP, not \fB\-i300\fP\&. .SH NOTES .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. +jsmond was tested with xlock(1) and xscreensaver(1). All 3 modes +(keycode, mouse click, and mouse motion) work with xscreensaver. +xlock doesn\(aqt respond to mouse motion, so use the keycode or click +modes with it. +.sp +jsmond can monitor up to MAX_STICKS joysticks. This is a compile time +constant, normally set to 16. See the \fB\-\-help\fP output to find out +the compiled\-in default. .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 @@ -121,8 +144,12 @@ jsmond will wait for devices to come into existence (e.g. as created by \fBudev\fP). .sp If the screensaver is configured to lock the screen, and it has already -activated, pressing a joystick button/direction will just bring up the +done so, pressing a joystick button/direction will just bring up the password dialog, same as pressing a key or mouse button would. +.sp +jsmond depends on the XTest extension being present in the X server. If +you get a "X server doesn\(aqt support XTest extension" error, see your X +server documentation to find out how to enable XTest. .SH EXIT STATUS .sp Without the \-D option, the exit status is 0 (success) if jsmond @@ -141,7 +168,10 @@ names (better to autodetect). .sp Normally once daemonized, jsmond is very robust. However, if something does go wrong, there\(aqs no way to find out what. Probably there should -be a log file, or use syslog. +be a log file, or use syslog (or is that overkill?). +.sp +It should be (but currently isn\(aqt) possible to at least work in +mouse\-motion mode even without the XTest extension, via XWarpPointer(). .sp jsmond isn\(aqt portable. It only works on Linux, at least for now, for three reasons: |