ports/162583: [MAINTAINER] misc/unclutter: Add patch for idle command
Simon Olofsson
simon at olofsson.de
Tue Nov 15 14:30:07 UTC 2011
>Number: 162583
>Category: ports
>Synopsis: [MAINTAINER] misc/unclutter: Add patch for idle command
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 15 14:30:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Simon Olofsson
>Release: FreeBSD 9.0-RC1 amd64
>Organization:
>Environment:
System: FreeBSD lua-fb 9.0-RC1 FreeBSD 9.0-RC1 #0: Tue Oct 18 18:51:43 UTC 2011
>Description:
- Pet portlint
- Daren Isaacs send a patch to support an idle command. Here's his rationale:
> I have added a small change to unclutter to allow for an idle command i.e.
> when the cursor goes idle run a command.
> I am using it to disable the touchpad on my laptop. I enable the touch pad
> manually (through a key binding) as required.
> No more accidental bumps on the touch pad closing windows etc.
Thanks Daren!
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- unclutter-8_3.patch begins here ---
diff --git a/misc/unclutter/Makefile b/misc/unclutter/Makefile
index b1eb9ad..5a91a14 100644
--- a/misc/unclutter/Makefile
+++ b/misc/unclutter/Makefile
@@ -7,7 +7,7 @@
PORTNAME= unclutter
PORTVERSION= 8
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= utilities
@@ -16,7 +16,7 @@ EXTRACT_SUFX= .tar.Z
MAINTAINER= simon at olofsson.de
COMMENT= Remove idle cursor image from screen
-WRKSRC= $(WRKDIR)/unclutter
+WRKSRC= ${WRKDIR}/unclutter
USE_IMAKE= yes
USE_XORG= x11 xext
MAN1= unclutter.1
diff --git a/misc/unclutter/files/patch-unclutter.c b/misc/unclutter/files/patch-unclutter.c
new file mode 100644
index 0000000..669aea3
--- /dev/null
+++ b/misc/unclutter/files/patch-unclutter.c
@@ -0,0 +1,52 @@
+--- unclutter.c.orig 1994-04-11 17:40:47.000000000 +0200
++++ unclutter.c 2011-11-14 17:02:18.000000000 +0100
+@@ -18,11 +18,13 @@
+ * visibility events.)
+ * Mark M Martin. cetia feb 1994 mmm at cetia.fr
+ * keystroke code from Bill Trost trost at cloud.rain.com
++ * 11May2011 idlecommand added.
+ */
+ #include <X11/Xos.h>
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xproto.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include "vroot.h"
+
+@@ -37,6 +39,7 @@
+ -idle <seconds> time between polls to detect idleness.\n\
+ -keystroke wait for keystroke before idling.\n\
+ -jitter <pixels> pixels mouse can twitch without moving\n\
++ -exec <idlecommand> execute idlecommand on idle.\n\
+ -grab use grabpointer method not createwindow\n\
+ -reset reset the timer whenever cursor becomes\n\
+ visible even if it hasn't moved\n\
+@@ -126,6 +129,7 @@
+ Window *realroot;
+ Window root;
+ char *displayname = 0;
++ char *idlecommand = 0;
+
+ progname = *argv;
+ argc--;
+@@ -134,6 +138,10 @@
+ argc--,argv++;
+ if(argc<0)usage();
+ idletime = atoi(*argv);
++ }else if(strcmp(*argv,"-exec")==0){
++ argc--,argv++;
++ if(argc<0)usage();
++ idlecommand = *argv;
+ }else if(strcmp(*argv,"-keystroke")==0){
+ idletime = -1;
+ }else if(strcmp(*argv,"-jitter")==0){
+@@ -253,6 +261,8 @@
+ if(idletime>=0)
+ sleep(idletime);
+ }
++ if(idlecommand!=0)
++ system(idlecommand);
+ /* wait again next time */
+ if(waitagain)
+ oldx = -1-jitter;
diff --git a/misc/unclutter/files/patch-unclutter.man b/misc/unclutter/files/patch-unclutter.man
new file mode 100644
index 0000000..9e411d7
--- /dev/null
+++ b/misc/unclutter/files/patch-unclutter.man
@@ -0,0 +1,22 @@
+--- unclutter.man.orig 1994-04-11 17:40:48.000000000 +0200
++++ unclutter.man 2011-11-15 10:30:01.000000000 +0100
+@@ -12,6 +12,8 @@
+ .RB [ -keystroke ]
+ .RB [ -jitter
+ .IR pixels ]
++.RB [ -exec
++.IR idlecommand ]
+ .RB [ -grab ]
+ .RB [ -noevents ]
+ .RB [ -reset ]
+@@ -47,6 +49,10 @@
+ and considered as random noise.
+ The default is 0.
+ .TP
++-exec
++is followed by a command to execute on idle.
++This is for example useful to disable a touchpad.
++.TP
+ -grab
+ means use the original method of grabbing the pointer in order to remove the
+ cursor.
--- unclutter-8_3.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list