diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | unsaver.1 (renamed from jsmond.1) | 46 | ||||
-rw-r--r-- | unsaver.c (renamed from jsmond.c) | 2 | ||||
-rw-r--r-- | unsaver.html (renamed from jsmond.html) | 50 | ||||
-rw-r--r-- | unsaver.rst (renamed from jsmond.rst) | 50 |
5 files changed, 77 insertions, 77 deletions
@@ -1,4 +1,4 @@ -# GNU Makefile for jsmond +# GNU Makefile for unsaver #### # Packagers: override these on the make command line as needed. @@ -49,12 +49,12 @@ RST2HTML=rst2html4.py # Hopefully, no user-serviceable parts below this line. -PROJ=jsmond +PROJ=unsaver # the .rst is the authoritative source for the version number. VERSION=$(shell fgrep '.. |version| replace::' $(PROJ).rst | cut -d' ' -f4) -DEFINES=-DVERSION=\"$(VERSION)\" -DMAX_STICKS=$(MAX_STICKS) -DJSNODE=\"$(JSNODE)\" -DEVENTDIR=\"$(EVENTDIR)\" +DEFINES=-DVERSION=\"$(VERSION)\" -DMAX_STICKS=$(MAX_STICKS) -DJSNODE=\"$(JSNODE)\" -DEVENTDIR=\"$(EVENTDIR)\" -DPROJ=\"$(PROJ)\" CFLAGS+=$(shell pkg-config --cflags x11 xtst) LDFLAGS+=$(shell pkg-config --libs x11 xtst) @@ -1,8 +1,8 @@ .\" Man page generated from reStructuredText. . -.TH JSMOND 1 "2020-05-19" "0.2.0" "Urchlay" +.TH UNSAVER 1 "2020-05-19" "0.3.0" "Urchlay" .SH NAME -jsmond \- deactivate screensaver on joystick activity +unsaver \- deactivate screensaver on joystick activity . .nr rst2man-indent-level 0 . @@ -30,38 +30,38 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" 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: +.\" RST source for unsaver(1) man page. Convert with: . -.\" rst2man.py jsmond.rst > jsmond.1 +.\" rst2man.py unsaver.rst > unsaver.1 . .SH SYNOPSIS .sp -jsmond [\fB\-i interval[s|ms]\fP] [\fB\-m\fP | \fB\-k keycode\fP | \fB\-b button\fP | \fB\-c command\fP | \fB\-x\fP ] [\fB\-d dir\fP] [\fB\-j name\fP] [\fB\-f\fP] [\fB\-F\fP] [\fB\-D\fP] [\fBjoydev [joydev ...]\fP] +unsaver [\fB\-i interval[s|ms]\fP] [\fB\-m\fP | \fB\-k keycode\fP | \fB\-b button\fP | \fB\-c command\fP | \fB\-x\fP ] [\fB\-d dir\fP] [\fB\-j name\fP] [\fB\-f\fP] [\fB\-F\fP] [\fB\-D\fP] [\fBjoydev [joydev ...]\fP] .SH DESCRIPTION .sp -jsmond lets you play games with your joysticks/gamepads without the screen +unsaver lets you play games with your joysticks/gamepads without the screen saver activating due to lack of keyboard/mouse input. It can also prevent the screensaver from activating when a fullscreen window is in use (e.g. while watching a movie). .sp -Multiple joystick devices can be monitored. By default, jsmond +Multiple joystick devices can be monitored. By default, unsaver 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 milliseconds (250, or whatever \fB\-i\fP is set to), jsmond +Every \fIinterval\fP milliseconds (250, or whatever \fB\-i\fP is set to), unsaver checks to see if there\(aqs been any activity on any of the devices it\(aqs 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, +It\(aqs recommended to let unsaver 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). .sp -jsmond should be started from your \fB\&.xinitrc\fP or whatever X startup +unsaver should be started from your \fB\&.xinitrc\fP or whatever X startup script your window manager or desktop environment uses. By default, it -will exit when the X server does. There\(aqs no PID file: use "pkill jsmond" +will exit when the X server does. There\(aqs no PID file: use "pkill unsaver" if you need to kill the daemon. .SH OPTIONS .INDENT 0.0 @@ -121,7 +121,7 @@ needed for normal use: .BI \-d \ <dir> Path to the directory containing joystick device nodes. Default is "/dev/input". This directory is monitored with -inotify(7) so jsmond will be aware of hotplug events. +inotify(7) so unsaver will be aware of hotplug events. .TP .BI \-j \ <name> Name of joystick device nodes, without any numeric @@ -135,12 +135,12 @@ 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 -jsmond was tested with xlock(1) and xscreensaver(1). All 3 modes +unsaver 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 +unsaver 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 @@ -148,18 +148,18 @@ the compiled\-in default. \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 via the \fB\-d\fP and \fB\-j\fP options. Note that (currently) -all the joystick devices have to be in the same directory for jsmond +all the joystick devices have to be in the same directory for unsaver to detect hotplug events! .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 +unsaver 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 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 +unsaver 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. .sp @@ -167,13 +167,13 @@ The fullscreen window monitoring has only been tested on a system with a single monitor, and may not work properly in multi\-head environments. .SH EXIT STATUS .sp -Without the \-D option, the exit status is 0 (success) if jsmond +Without the \-D option, the exit status is 0 (success) if unsaver 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. +With the \-D option, unsaver never exits until it\(aqs killed. .SH BUGS .sp There\(aqs no way to distinguish between an invalid device name and a @@ -181,14 +181,14 @@ 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 -Normally once daemonized, jsmond is very robust. However, if something +Normally once daemonized, unsaver 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 (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 +unsaver isn\(aqt portable. It only works on Linux, at least for now, for three reasons: .INDENT 0.0 .IP \(bu 2 @@ -205,10 +205,10 @@ to port the code. . .SH LICENSE .sp -jsmond is released under the WTFPL: Do WTF you want with this. +unsaver 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>. +unsaver was written by B. Watson <\fI\%yalhcru@gmail.com\fP>. .SH SEE ALSO .sp jstest(1), jscal(1), sdl\-jstest(1), sdl2\-jstest(2) @@ -76,7 +76,7 @@ struct inotify_event *inotify_ev = (struct inotify_event *)inotify_buf; /* not going to include pages of usage info duplicating the man page */ void usage(void) { - printf("jsmond v" VERSION " by B. Watson, WTFPL\n"); + printf(PROJ " v" VERSION " by B. Watson, WTFPL\n"); printf("Usage: %s [-i interval] [-b button | -k keycode] [-j name]\n", self); printf(" [-d dir] [-D] [joystick [...]]\n"); printf("Built-in defaults: MAX_STICKS=%d, -d " EVENTDIR ", -j " JSNODE "\n", MAX_STICKS); diff --git a/jsmond.html b/unsaver.html index 370edac..7d3ce80 100644 --- a/jsmond.html +++ b/unsaver.html @@ -4,7 +4,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" /> -<title>jsmond</title> +<title>unsaver</title> <meta name="date" content="2020-05-19" /> <style type="text/css"> @@ -361,8 +361,8 @@ ul.auto-toc { </style> </head> <body> -<div class="document" id="jsmond"> -<h1 class="title">jsmond</h1> +<div class="document" id="unsaver"> +<h1 class="title">unsaver</h1> <h2 class="subtitle" id="deactivate-screensaver-on-joystick-activity">deactivate screensaver on joystick activity</h2> <table class="docinfo" frame="void" rules="none"> <col class="docinfo-name" /> @@ -375,36 +375,36 @@ ul.auto-toc { <tr><th class="docinfo-name">Date:</th> <td>2020-05-19</td></tr> <tr><th class="docinfo-name">Version:</th> -<td>0.2.0</td></tr> +<td>0.3.0</td></tr> </tbody> </table> -<!-- RST source for jsmond(1) man page. Convert with: --> -<!-- rst2man.py jsmond.rst > jsmond.1 --> +<!-- RST source for unsaver(1) man page. Convert with: --> +<!-- rst2man.py unsaver.rst > unsaver.1 --> <div class="section" id="synopsis"> <h1>SYNOPSIS</h1> -<p>jsmond [<strong>-i interval[s|ms]</strong>] [<strong>-m</strong> | <strong>-k keycode</strong> | <strong>-b button</strong> | <strong>-c command</strong> | <strong>-x</strong> ] [<strong>-d dir</strong>] [<strong>-j name</strong>] [<strong>-f</strong>] [<strong>-F</strong>] [<strong>-D</strong>] [<strong>joydev [joydev ...]</strong>]</p> +<p>unsaver [<strong>-i interval[s|ms]</strong>] [<strong>-m</strong> | <strong>-k keycode</strong> | <strong>-b button</strong> | <strong>-c command</strong> | <strong>-x</strong> ] [<strong>-d dir</strong>] [<strong>-j name</strong>] [<strong>-f</strong>] [<strong>-F</strong>] [<strong>-D</strong>] [<strong>joydev [joydev ...]</strong>]</p> </div> <div class="section" id="description"> <h1>DESCRIPTION</h1> -<p>jsmond lets you play games with your joysticks/gamepads without the screen +<p>unsaver lets you play games with your joysticks/gamepads without the screen saver activating due to lack of keyboard/mouse input. It can also prevent the screensaver from activating when a fullscreen window is in use (e.g. while watching a movie).</p> -<p>Multiple joystick devices can be monitored. By default, jsmond +<p>Multiple joystick devices can be monitored. By default, unsaver monitors up to 16 devices, named /dev/input/js0 through js15. These devices don't have to actually exist: they can come and go as joysticks are plugged in and unplugged.</p> -<p>Every <em>interval</em> milliseconds (250, or whatever <strong>-i</strong> is set to), jsmond +<p>Every <em>interval</em> milliseconds (250, or whatever <strong>-i</strong> is set to), unsaver checks to see if there's been any activity on any of the devices it's monitoring. If so, it sends a fake mouse movement, keystroke, or mouse button click, which the screen saver will see as activity.</p> -<p>It's recommended to let jsmond find the joysticks itself. However, +<p>It's recommended to let unsaver find the joysticks itself. However, you can pass one or more device names (or just numbers) if the default doesn't do the right thing for you. In this case, only these devices will be monitored (no search is done).</p> -<p>jsmond should be started from your <strong>.xinitrc</strong> or whatever X startup +<p>unsaver should be started from your <strong>.xinitrc</strong> or whatever X startup script your window manager or desktop environment uses. By default, it -will exit when the X server does. There's no PID file: use "pkill jsmond" +will exit when the X server does. There's no PID file: use "pkill unsaver" if you need to kill the daemon.</p> </div> <div class="section" id="options"> @@ -472,7 +472,7 @@ needed for normal use:</p> <kbd><span class="option">-d <var><dir></var></span></kbd></td> <td>Path to the directory containing joystick device nodes. Default is "/dev/input". This directory is monitored with -inotify(7) so jsmond will be aware of hotplug events.</td></tr> +inotify(7) so unsaver will be aware of hotplug events.</td></tr> <tr><td class="option-group"> <kbd><span class="option">-j <var><name></var></span></kbd></td> <td>Name of joystick device nodes, without any numeric @@ -487,26 +487,26 @@ above. Use e.g. <strong>-i 300</strong>, not <strong>-i300</strong>.</p> </div> <div class="section" id="notes"> <h1>NOTES</h1> -<p>jsmond was tested with xlock(1) and xscreensaver(1). All 3 modes +<p>unsaver was tested with xlock(1) and xscreensaver(1). All 3 modes (keycode, mouse click, and mouse motion) work with xscreensaver. xlock doesn't respond to mouse motion, so use the keycode or click modes with it.</p> -<p>jsmond can monitor up to MAX_STICKS joysticks. This is a compile time +<p>unsaver can monitor up to MAX_STICKS joysticks. This is a compile time constant, normally set to 16. See the <strong>--help</strong> output to find out the compiled-in default.</p> <p><strong>joydev</strong> arguments can be either a path to a device node (e.g. <em>/dev/input/js0</em> 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 via the <strong>-d</strong> and <strong>-j</strong> options. Note that (currently) -all the joystick devices have to be in the same directory for jsmond +all the joystick devices have to be in the same directory for unsaver to detect hotplug events!</p> <p>Note that it's <em>not</em> an error to give nonexistent joystick device names. -jsmond will wait for devices to come into existence (e.g. as created +unsaver will wait for devices to come into existence (e.g. as created by <strong>udev</strong>).</p> <p>If the screensaver is configured to lock the screen, and it has already done so, pressing a joystick button/direction will just bring up the password dialog, same as pressing a key or mouse button would.</p> -<p>jsmond depends on the XTest extension being present in the X server. If +<p>unsaver depends on the XTest extension being present in the X server. If you get a "X server doesn't support XTest extension" error, see your X server documentation to find out how to enable XTest.</p> <p>The fullscreen window monitoring has only been tested on a system with @@ -514,11 +514,11 @@ a single monitor, and may not work properly in multi-head environments.</p> </div> <div class="section" id="exit-status"> <h1>EXIT STATUS</h1> -<p>Without the -D option, the exit status is 0 (success) if jsmond +<p>Without the -D option, the exit status is 0 (success) if unsaver successfully forked into the background.</p> <p>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.</p> -<p>With the -D option, jsmond never exits until it's killed.</p> +<p>With the -D option, unsaver never exits until it's killed.</p> </div> <div class="section" id="bugs"> <h1>BUGS</h1> @@ -526,12 +526,12 @@ or else fork() failed. No daemon will be running in this case.</p> device name that doesn't happen to exist yet because its device hasn't been plugged in yet. Try to avoid typos, if you really have to use device names (better to autodetect).</p> -<p>Normally once daemonized, jsmond is very robust. However, if something +<p>Normally once daemonized, unsaver is very robust. However, if something does go wrong, there's no way to find out what. Probably there should be a log file, or use syslog (or is that overkill?).</p> <p>It should be (but currently isn't) possible to at least work in mouse-motion mode even without the XTest extension, via XWarpPointer().</p> -<p>jsmond isn't portable. It only works on Linux, at least for now, for +<p>unsaver isn't portable. It only works on Linux, at least for now, for three reasons:</p> <ul class="simple"> <li>It uses the Linux joystick API.</li> @@ -544,11 +544,11 @@ to port the code.</li> </div> <div class="section" id="license"> <h1>LICENSE</h1> -<p>jsmond is released under the WTFPL: Do WTF you want with this.</p> +<p>unsaver is released under the WTFPL: Do WTF you want with this.</p> </div> <div class="section" id="author"> <h1>AUTHOR</h1> -<p>jsmond was written by B. Watson <<a class="reference external" href="mailto:yalhcru@gmail.com">yalhcru@gmail.com</a>>.</p> +<p>unsaver was written by B. Watson <<a class="reference external" href="mailto:yalhcru@gmail.com">yalhcru@gmail.com</a>>.</p> </div> <div class="section" id="see-also"> <h1>SEE ALSO</h1> @@ -1,12 +1,12 @@ -.. RST source for jsmond(1) man page. Convert with: -.. rst2man.py jsmond.rst > jsmond.1 +.. RST source for unsaver(1) man page. Convert with: +.. rst2man.py unsaver.rst > unsaver.1 -.. |version| replace:: 0.2.0 +.. |version| replace:: 0.3.0 .. |date| date:: -====== -jsmond -====== +======= +unsaver +======= ------------------------------------------- deactivate screensaver on joystick activity @@ -20,34 +20,34 @@ deactivate screensaver on joystick activity SYNOPSIS ======== -jsmond [**-i interval[s|ms]**] [**-m** | **-k keycode** | **-b button** | **-c command** | **-x** ] [**-d dir**] [**-j name**] [**-f**] [**-F**] [**-D**] [**joydev [joydev ...]**] +unsaver [**-i interval[s|ms]**] [**-m** | **-k keycode** | **-b button** | **-c command** | **-x** ] [**-d dir**] [**-j name**] [**-f**] [**-F**] [**-D**] [**joydev [joydev ...]**] DESCRIPTION =========== -jsmond lets you play games with your joysticks/gamepads without the screen +unsaver lets you play games with your joysticks/gamepads without the screen saver activating due to lack of keyboard/mouse input. It can also prevent the screensaver from activating when a fullscreen window is in use (e.g. while watching a movie). -Multiple joystick devices can be monitored. By default, jsmond +Multiple joystick devices can be monitored. By default, unsaver monitors up to 16 devices, named /dev/input/js0 through js15. These devices don't have to actually exist: they can come and go as joysticks are plugged in and unplugged. -Every *interval* milliseconds (250, or whatever **-i** is set to), jsmond +Every *interval* milliseconds (250, or whatever **-i** is set to), unsaver checks to see if there's been any activity on any of the devices it's monitoring. If so, it sends a fake mouse movement, keystroke, or mouse button click, which the screen saver will see as activity. -It's recommended to let jsmond find the joysticks itself. However, +It's recommended to let unsaver find the joysticks itself. However, you can pass one or more device names (or just numbers) if the default doesn't do the right thing for you. In this case, only these devices will be monitored (no search is done). -jsmond should be started from your **.xinitrc** or whatever X startup +unsaver should be started from your **.xinitrc** or whatever X startup script your window manager or desktop environment uses. By default, it -will exit when the X server does. There's no PID file: use "pkill jsmond" +will exit when the X server does. There's no PID file: use "pkill unsaver" if you need to kill the daemon. OPTIONS @@ -96,7 +96,7 @@ needed for normal use: -d <dir> Path to the directory containing joystick device nodes. Default is "/dev/input". This directory is monitored with - inotify(7) so jsmond will be aware of hotplug events. + inotify(7) so unsaver will be aware of hotplug events. -j <name> Name of joystick device nodes, without any numeric suffix. Default is "js". @@ -109,12 +109,12 @@ above. Use e.g. **-i 300**, not **-i300**. NOTES ===== -jsmond was tested with xlock(1) and xscreensaver(1). All 3 modes +unsaver was tested with xlock(1) and xscreensaver(1). All 3 modes (keycode, mouse click, and mouse motion) work with xscreensaver. xlock doesn't respond to mouse motion, so use the keycode or click modes with it. -jsmond can monitor up to MAX_STICKS joysticks. This is a compile time +unsaver can monitor up to MAX_STICKS joysticks. This is a compile time constant, normally set to 16. See the **--help** output to find out the compiled-in default. @@ -122,18 +122,18 @@ the compiled-in default. */dev/input/js0* 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 via the **-d** and **-j** options. Note that (currently) -all the joystick devices have to be in the same directory for jsmond +all the joystick devices have to be in the same directory for unsaver to detect hotplug events! Note that it's *not* an error to give nonexistent joystick device names. -jsmond will wait for devices to come into existence (e.g. as created +unsaver will wait for devices to come into existence (e.g. as created by **udev**). If the screensaver is configured to lock the screen, and it has already done so, pressing a joystick button/direction will just bring up the password dialog, same as pressing a key or mouse button would. -jsmond depends on the XTest extension being present in the X server. If +unsaver depends on the XTest extension being present in the X server. If you get a "X server doesn't support XTest extension" error, see your X server documentation to find out how to enable XTest. @@ -143,13 +143,13 @@ a single monitor, and may not work properly in multi-head environments. EXIT STATUS =========== -Without the -D option, the exit status is 0 (success) if jsmond +Without the -D option, the exit status is 0 (success) if unsaver successfully forked into the background. 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. -With the -D option, jsmond never exits until it's killed. +With the -D option, unsaver never exits until it's killed. BUGS ==== @@ -159,14 +159,14 @@ device name that doesn't happen to exist yet because its device hasn't been plugged in yet. Try to avoid typos, if you really have to use device names (better to autodetect). -Normally once daemonized, jsmond is very robust. However, if something +Normally once daemonized, unsaver is very robust. However, if something does go wrong, there's no way to find out what. Probably there should be a log file, or use syslog (or is that overkill?). It should be (but currently isn't) possible to at least work in mouse-motion mode even without the XTest extension, via XWarpPointer(). -jsmond isn't portable. It only works on Linux, at least for now, for +unsaver isn't portable. It only works on Linux, at least for now, for three reasons: - It uses the Linux joystick API. @@ -182,12 +182,12 @@ three reasons: LICENSE ======= -jsmond is released under the WTFPL: Do WTF you want with this. +unsaver is released under the WTFPL: Do WTF you want with this. AUTHOR ====== -jsmond was written by B. Watson <yalhcru@gmail.com>. +unsaver was written by B. Watson <yalhcru@gmail.com>. SEE ALSO ======== |