unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: xorg: Add unclutter.
@ 2014-08-24  6:36 Alex Kost
  2014-08-24 10:39 ` Andreas Enge
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Kost @ 2014-08-24  6:36 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

A tiny program for hiding mouse cursor (I use it all the time :)).

I think “xorg.scm” is a proper place for it or should it be put in a
separate file?


[-- Attachment #2: 0001-gnu-xorg-Add-unclutter.patch --]
[-- Type: text/x-diff, Size: 2981 bytes --]

From 6b900258d2b17ddf6b99def0f41b7bedf0d069af Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Sun, 24 Aug 2014 10:30:05 +0400
Subject: [PATCH] gnu: xorg: Add unclutter.

* gnu/packages/xorg.scm (unclutter): New variable.
---
 gnu/packages/xorg.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index ce3c4ec..9f8cdd0 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -76,6 +77,52 @@ following the mouse.")
     (license license:x11)))
 
 
+(define-public unclutter
+  (package
+   (name "unclutter")
+   (version "8")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append
+                  "http://ftp.x.org/contrib/utilities/unclutter-"
+                  version ".tar.Z"))
+            (sha256
+             (base32
+              "0ahrr5z6wxqqfyihm112hnq0859zlxisrb3y5232zav58j6sfmdq"))))
+   (build-system gnu-build-system)
+   (arguments
+    '(#:tests? #f  ; no check target
+      #:phases (alist-delete
+                'configure
+                (alist-replace
+                 'install
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let* ((out  (assoc-ref outputs "out"))
+                          (bin  (string-append out "/bin"))
+                          (man1 (string-append out "/share/man/man1")))
+                     (mkdir-p bin)
+                     (mkdir-p man1)
+                     (zero?
+                      (system* "make" "install" "install.man"
+                               (string-append "BINDIR=" bin)
+                               (string-append "MANDIR=" man1)))))
+                 %standard-phases))))
+   (inputs `(("libx11" ,libx11)))
+   (home-page "http://ftp.x.org/contrib/utilities/")
+   (synopsis "Hide idle mouse cursor")
+   (description
+    "Unclutter is a program which runs permanently in the background of an X11
+session.  It checks on the X11 pointer (cursor) position every few
+seconds, and when it finds it has not moved (and no buttons
+are pressed on the mouse, and the cursor is not in the root window)
+it creates a small sub-window as a child of the window the cursor is in.
+The new window installs a cursor of size 1x1 but a mask of
+all 0, ie an invisible cursor.  This allows you to see all the text in
+an xterm or xedit, for example.  The human factors crowd would agree it
+should make things less distracting.")
+   (license license:public-domain)))
+
+
 (define-public pixman
   (package
     (name "pixman")
-- 
2.0.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-24  6:36 [PATCH] gnu: xorg: Add unclutter Alex Kost
@ 2014-08-24 10:39 ` Andreas Enge
  2014-08-24 13:00   ` Alex Kost
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Enge @ 2014-08-24 10:39 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Sun, Aug 24, 2014 at 10:36:35AM +0400, Alex Kost wrote:
> I think “xorg.scm” is a proper place for it or should it be put in a
> separate file?

xorg.scm should contain only the x.org system proper, plus some dependencies
needed to compile it.

Andreas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-24 10:39 ` Andreas Enge
@ 2014-08-24 13:00   ` Alex Kost
  2014-08-25  7:06     ` Alex Kost
  2014-08-25  7:19     ` Andreas Enge
  0 siblings, 2 replies; 9+ messages in thread
From: Alex Kost @ 2014-08-24 13:00 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

Andreas Enge (2014-08-24 14:39 +0400) wrote:

> On Sun, Aug 24, 2014 at 10:36:35AM +0400, Alex Kost wrote:
>> I think “xorg.scm” is a proper place for it or should it be put in a
>> separate file?
>
> xorg.scm should contain only the x.org system proper, plus some dependencies
> needed to compile it.

Ah, sorry.  Here is the new patch.


[-- Attachment #2: 0001-gnu-Add-unclutter.patch --]
[-- Type: text/x-diff, Size: 4279 bytes --]

From 445bea0963a4986ad67618d1e976dbc1132873bf Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Sun, 24 Aug 2014 16:56:17 +0400
Subject: [PATCH] gnu: Add unclutter.

* gnu/packages/unclutter.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am              |  3 +-
 gnu/packages/unclutter.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/unclutter.scm

diff --git a/gnu-system.am b/gnu-system.am
index f29f3f6..727a30e 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -233,9 +233,10 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/time.scm				\
   gnu/packages/tmux.scm				\
   gnu/packages/tor.scm				\
-  gnu/packages/uucp.scm				\
+  gnu/packages/unclutter.scm			\
   gnu/packages/unrtf.scm			\
   gnu/packages/upnp.scm				\
+  gnu/packages/uucp.scm				\
   gnu/packages/valgrind.scm			\
   gnu/packages/version-control.scm		\
   gnu/packages/video.scm			\
diff --git a/gnu/packages/unclutter.scm b/gnu/packages/unclutter.scm
new file mode 100644
index 0000000..f5a1569
--- /dev/null
+++ b/gnu/packages/unclutter.scm
@@ -0,0 +1,69 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages unclutter)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages xorg))
+
+(define-public unclutter
+  (package
+   (name "unclutter")
+   (version "8")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append
+                  "http://ftp.x.org/contrib/utilities/unclutter-"
+                  version ".tar.Z"))
+            (sha256
+             (base32
+              "0ahrr5z6wxqqfyihm112hnq0859zlxisrb3y5232zav58j6sfmdq"))))
+   (build-system gnu-build-system)
+   (arguments
+    '(#:tests? #f  ; no check target
+      #:phases (alist-delete
+                'configure
+                (alist-replace
+                 'install
+                 (lambda* (#:key inputs outputs #:allow-other-keys)
+                   (let* ((out  (assoc-ref outputs "out"))
+                          (bin  (string-append out "/bin"))
+                          (man1 (string-append out "/share/man/man1")))
+                     (mkdir-p bin)
+                     (mkdir-p man1)
+                     (zero?
+                      (system* "make" "install" "install.man"
+                               (string-append "BINDIR=" bin)
+                               (string-append "MANDIR=" man1)))))
+                 %standard-phases))))
+   (inputs `(("libx11" ,libx11)))
+   (home-page "http://ftp.x.org/contrib/utilities/")
+   (synopsis "Hide idle mouse cursor")
+   (description
+    "Unclutter is a program which runs permanently in the background of an X11
+session.  It checks on the X11 pointer (cursor) position every few
+seconds, and when it finds it has not moved (and no buttons
+are pressed on the mouse, and the cursor is not in the root window)
+it creates a small sub-window as a child of the window the cursor is in.
+The new window installs a cursor of size 1x1 but a mask of
+all 0, ie an invisible cursor.  This allows you to see all the text in
+an xterm or xedit, for example.  The human factors crowd would agree it
+should make things less distracting.")
+   (license public-domain)))
-- 
2.0.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-24 13:00   ` Alex Kost
@ 2014-08-25  7:06     ` Alex Kost
  2014-08-25  7:19     ` Andreas Enge
  1 sibling, 0 replies; 9+ messages in thread
From: Alex Kost @ 2014-08-25  7:06 UTC (permalink / raw)
  To: guix-devel

Alex Kost (2014-08-24 17:00 +0400) wrote:

> Andreas Enge (2014-08-24 14:39 +0400) wrote:
>
>> On Sun, Aug 24, 2014 at 10:36:35AM +0400, Alex Kost wrote:
>>> I think “xorg.scm” is a proper place for it or should it be put in a
>>> separate file?
>>
>> xorg.scm should contain only the x.org system proper, plus some dependencies
>> needed to compile it.
>
> Ah, sorry.  Here is the new patch.

As I have an access to the git repo now, I'm going to push it, unless
someone has comments/objections.

--
Alex Kost

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-24 13:00   ` Alex Kost
  2014-08-25  7:06     ` Alex Kost
@ 2014-08-25  7:19     ` Andreas Enge
  2014-08-25 12:19       ` Alex Kost
  2014-08-25 14:41       ` Eric Bavier
  1 sibling, 2 replies; 9+ messages in thread
From: Andreas Enge @ 2014-08-25  7:19 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Just one last comment:

On Sun, Aug 24, 2014 at 05:00:59PM +0400, Alex Kost wrote:
> +it creates a small sub-window as a child of the window the cursor is in.
> +The new window installs a cursor of size 1x1 but a mask of

If I remember correctly, to obtain the two spaces after a ".", it should
not be at the end of a line.

Andreas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-25  7:19     ` Andreas Enge
@ 2014-08-25 12:19       ` Alex Kost
  2014-08-25 12:27         ` Andreas Enge
  2014-08-25 14:41       ` Eric Bavier
  1 sibling, 1 reply; 9+ messages in thread
From: Alex Kost @ 2014-08-25 12:19 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge (2014-08-25 11:19 +0400) wrote:

> Just one last comment:
>
> On Sun, Aug 24, 2014 at 05:00:59PM +0400, Alex Kost wrote:
>> +it creates a small sub-window as a child of the window the cursor is in.
>> +The new window installs a cursor of size 1x1 but a mask of
>
> If I remember correctly, to obtain the two spaces after a ".", it should
> not be at the end of a line.

Sorry, I didn't get it.  What should be changed?  (I just took a first
paragraph from <http://ftp.x.org/contrib/utilities/unclutter-8.README>.)

Maybe reformat it like this (?):

   (description
    "Unclutter is a program which runs permanently in the background of an
X11 session.  It checks on the X11 pointer (cursor) position every few
seconds, and when it finds it has not moved (and no buttons are pressed
on the mouse, and the cursor is not in the root window) it creates a
small sub-window as a child of the window the cursor is in.  The new
window installs a cursor of size 1x1 but a mask of all 0, i.e. an
invisible cursor.  This allows you to see all the text in an xterm or
xedit, for example.  The human factors crowd would agree it should make
things less distracting.")

-- 
Alex Kost

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-25 12:19       ` Alex Kost
@ 2014-08-25 12:27         ` Andreas Enge
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Enge @ 2014-08-25 12:27 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

On Mon, Aug 25, 2014 at 04:19:20PM +0400, Alex Kost wrote:
> Maybe reformat it like this (?):

Yes, make it so that the sentence endings are inside a line and a line does
not end with "." (if it does, then the newline following it is counted as
a single space, not a double one; maybe one could then also start the next
line with a space, something I did not try).

Andreas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-25  7:19     ` Andreas Enge
  2014-08-25 12:19       ` Alex Kost
@ 2014-08-25 14:41       ` Eric Bavier
  2014-08-25 18:36         ` Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Bavier @ 2014-08-25 14:41 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel, Alex Kost


Andreas Enge writes:

> Just one last comment:
>
> On Sun, Aug 24, 2014 at 05:00:59PM +0400, Alex Kost wrote:
>> +it creates a small sub-window as a child of the window the cursor is in.
>> +The new window installs a cursor of size 1x1 but a mask of
>
> If I remember correctly, to obtain the two spaces after a ".", it should
> not be at the end of a line.

This bug was fixed by Cyrill in 3a09e1d2.

-- 
Eric Bavier

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gnu: xorg: Add unclutter.
  2014-08-25 14:41       ` Eric Bavier
@ 2014-08-25 18:36         ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2014-08-25 18:36 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel, Alex Kost

Eric Bavier <ericbavier@gmail.com> skribis:

> Andreas Enge writes:
>
>> Just one last comment:
>>
>> On Sun, Aug 24, 2014 at 05:00:59PM +0400, Alex Kost wrote:
>>> +it creates a small sub-window as a child of the window the cursor is in.
>>> +The new window installs a cursor of size 1x1 but a mask of
>>
>> If I remember correctly, to obtain the two spaces after a ".", it should
>> not be at the end of a line.
>
> This bug was fixed by Cyrill in 3a09e1d2.

Yes, so no problem here.

No objection on my side for committing the patch!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-08-25 18:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-24  6:36 [PATCH] gnu: xorg: Add unclutter Alex Kost
2014-08-24 10:39 ` Andreas Enge
2014-08-24 13:00   ` Alex Kost
2014-08-25  7:06     ` Alex Kost
2014-08-25  7:19     ` Andreas Enge
2014-08-25 12:19       ` Alex Kost
2014-08-25 12:27         ` Andreas Enge
2014-08-25 14:41       ` Eric Bavier
2014-08-25 18:36         ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).