diff mbox series

[bug#67453] home: services: unclutter: Convert to non-one-shot service

Message ID d61d25b0d5875d3350babd43fb4bef2d64a5233b.1700989215.git.saku@laesvuori.fi
State New
Headers show
Series [bug#67453] home: services: unclutter: Convert to non-one-shot service | expand

Commit Message

Saku Laesvuori Nov. 26, 2023, 9 a.m. UTC
* gnu/home/services/desktop.scm (home-unclutter-shepherd-service)
[one-shot?]: Remove field.
[stop]: Add kill action.

Change-Id: I33551607b05dbac30da94f81fd605ff9624ebe24
---
 gnu/home/services/desktop.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 9f67681db15d22f7ede5488315d52b78e357343e

Comments

Saku Laesvuori Jan. 15, 2024, 3:50 p.m. UTC | #1
On Sun, Nov 26, 2023 at 11:00:15AM +0200, Saku Laesvuori wrote:
> * gnu/home/services/desktop.scm (home-unclutter-shepherd-service)
> [one-shot?]: Remove field.
> [stop]: Add kill action.

A reminder about this trivial change. The unclutter service spawns a
process that hides the cursor when it is inactive. The process runs for
the entire session and killing it causes the cursor to stay visible even
when inactive, so it seems to me that it should be provided by a normal
service that can be started/stopped.
Saku Laesvuori March 22, 2024, 9:15 a.m. UTC | #2
On Mon, Jan 15, 2024 at 05:50:12PM +0200, Saku Laesvuori wrote:
> On Sun, Nov 26, 2023 at 11:00:15AM +0200, Saku Laesvuori wrote:
> > * gnu/home/services/desktop.scm (home-unclutter-shepherd-service)
> > [one-shot?]: Remove field.
> > [stop]: Add kill action.
> 
> A reminder about this trivial change. The unclutter service spawns a
> process that hides the cursor when it is inactive. The process runs for
> the entire session and killing it causes the cursor to stay visible even
> when inactive, so it seems to me that it should be provided by a normal
> service that can be started/stopped.

Ping
diff mbox series

Patch

diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm
index 91465bf168..6bb117ea8c 100644
--- a/gnu/home/services/desktop.scm
+++ b/gnu/home/services/desktop.scm
@@ -347,7 +347,6 @@  (define (home-unclutter-shepherd-service config)
    (shepherd-service
     (provision '(unclutter))
     (requirement '())
-    (one-shot? #t)
     (start #~(make-forkexec-constructor
               (list
                #$(file-append
@@ -360,7 +359,8 @@  (define (home-unclutter-shepherd-service config)
                           (or (getenv "XDG_STATE_HOME")
                               (format #f "~a/.local/state"
                                       (getenv "HOME")))
-                          "/log/unclutter.log"))))))
+                          "/log/unclutter.log")))
+    (stop #~(make-kill-destructor)))))
 
 (define home-unclutter-service-type
   (service-type