From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Arnaud Daby-Seesaram <ds-ac@nanein.fr>
Cc: "Hilton Chain" <hako@ultrarare.space>,
"Ludovic Courtès" <ludo@gnu.org>,
72714-done@debbugs.gnu.org
Subject: bug#72714: [PATCH v8] home: services: Add 'home-sway-service-type'.
Date: Sat, 12 Oct 2024 15:11:56 +0200 [thread overview]
Message-ID: <87iktx79er.fsf@pelzflorian.de> (raw)
In-Reply-To: <20241008223645.19674-1-ds-ac@nanein.fr> (Arnaud Daby-Seesaram's message of "Wed, 9 Oct 2024 00:33:41 +0200")
[-- Attachment #1: Type: text/plain, Size: 125 bytes --]
Pushed as b64f7984a5e2aba04df72a92f0044e423efe77c6,
Change-Id: I880261570c5afdb795f2ce18bac2b9a5c898677f
with tiny changes.
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 6606 bytes --]
---
doc/guix.texi | 16 ++++++++--------
gnu/home/services/sway.scm | 24 ++++++++----------------
2 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 0f45ef3b15..ddbff8bc23 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -47170,13 +47170,13 @@ Sway window manager
want to do so, you might be interested in using
@code{greetd-wlgreet-sway-session} instead.
-The function @code{sway-configuration->file} defined below can be used
+The proceedure @code{sway-configuration->file} defined below can be used
to provide the value for the @emph{optional} @code{sway-configuration}
field of @code{greetd-wlgreet-sway-session}.
@end quotation
@deffn {Procedure} sway-configuration->file config
-This function takes one argument @code{config}, which must be a
+This procedure takes one argument @code{config}, which must be a
@code{sway-configuration} record (defined below), and returns a
file-like object representing the serialized configuration.
@end deffn
@@ -47263,11 +47263,11 @@ Sway window manager
@item @code{startup+reload-programs} (default: @code{'()})
Programs to execute at startup time @emph{and} after every configuration
reload. The value of this field is a list of strings, G-expressions or
-file-append objects (@pxref{G-Expressions}).
+file-like objects (@pxref{G-Expressions}).
@item @code{startup-programs} (default: @code{%sway-default-execs})
Programs to execute at startup time. As above, values of this field are
-a list of strings, G-expressions or file-append objects.
+a list of strings, G-expressions or file-like objects.
The default value, @code{%sway-default-execs}, executes @code{swayidle}
in order to lock the screen after 5@ minutes of inactivity (displaying a
@@ -47283,7 +47283,7 @@ Sway window manager
@deftp {Data Type} sway-input
@code{sway-input} records describe input blocks (see@
@cite{sway-input(5)}). For example, the following snippet makes all
-keyboards use a french layout, in which @kbd{capslock} has been remaped
+keyboards use a French layout, in which @kbd{capslock} has been remapped
to @kbd{ctrl}:
@lisp
(sway-input (identifier "type:keyboard")
@@ -47365,8 +47365,8 @@ Sway window manager
the wallpaper will be displayed. It must be a symbol among
@code{stretch}, @code{fill}, @code{fit}, @code{center} and @code{tile}.
-If the second element is not specified (@i{i.e.}@: when the value not a
-pair), the @code{fill} mode will be used.
+If the second element is not specified (@i{i.e.}@: when the value is not
+a pair), the @code{fill} mode will be used.
@end itemize
@quotation Note
@@ -47444,7 +47444,7 @@ Sway window manager
@item @code{colors} (optional)
An optional @code{sway-color} configuration record.
-@item @code{status-command} (default: @code{%sway-status-command})
+@item @code{status-command} (optional)
This field accept strings, G-expressions and executable file-like
values. The default value is a command (string) that prints the date
and time every second.
diff --git a/gnu/home/services/sway.scm b/gnu/home/services/sway.scm
index 9401c80400..0e1a2d57b2 100644
--- a/gnu/home/services/sway.scm
+++ b/gnu/home/services/sway.scm
@@ -20,9 +20,6 @@ (define-module (gnu home services sway)
#:use-module (guix modules)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:use-module (ice-9 popen)
- #:use-module (ice-9 format)
#:use-module (ice-9 match)
#:use-module (guix packages)
#:use-module (gnu system keyboard)
@@ -52,7 +49,6 @@ (define-module (gnu home services sway)
%sway-default-gestures
%sway-default-modes
%sway-default-keybindings
- %sway-default-status-command
%sway-default-startup-programs
%sway-default-packages))
@@ -221,7 +217,7 @@ (define-configuration/no-serialization sway-bar
"Color palette of the bar.")
(status-command
maybe-status-command
- "Status command. It must be file-like.")
+ "Status command.")
(mouse-bindings
(mouse-bindings '())
"Actions triggered by mouse events.")
@@ -275,7 +271,6 @@ (define-configuration/no-serialization sway-mode
(mouse-bindings
(mouse-bindings '())
"Mouse bindings."))
-;; TODO (not necessary for 72714): switch bindings.
(define (sway-modes? lst)
(every sway-mode? lst))
@@ -327,10 +322,10 @@ (define sway-menu
(with-imported-modules
(source-module-closure '((guix build utils)))
#~(begin
- (use-modules (ice-9 popen)
+ (use-modules (ice-9 ftw)
+ (ice-9 popen)
(ice-9 receive)
(ice-9 rdelim)
- (ice-9 ftw)
(guix build utils)
(srfi srfi-1))
@@ -351,7 +346,7 @@ (define sway-menu
"/.guix-home/profile/bin"))
(wmenu #$(file-append wmenu "/bin/wmenu"))
(swaymsg #$(file-append sway "/bin/swaymsg")))
- (receive (from to pid)
+ (receive (from to pids)
(pipeline `((,wmenu)))
(for-each
(lambda (c) (format to "~a~%" c))
@@ -359,8 +354,8 @@ (define sway-menu
(close to)
(let ((choice (read-line from)))
(close from)
- (waitpid (first pid))
- (when (string? choice) ;do not attempty to launch if no choice
+ (waitpid (first pids))
+ (when (string? choice) ;do not attempt to launch if no choice
;was given (e.g. if Escape is pressed in
;wmenu).
(execl swaymsg swaymsg "exec" "--"
@@ -464,9 +459,6 @@ (define %sway-default-keybindings
($mod+minus . "scratchpad show")
($mod+r . "mode \"resize\"")))
-(define %sway-default-status-command
- "while date +'%Y-%m-%d %X'; do sleep 1; done")
-
(define %sway-default-startup-programs
(list
#~(string-append
@@ -751,7 +743,7 @@ (define (sway-configuration->file conf)
(computed-file
"sway-config"
#~(begin
- (use-modules (ice-9 format) (ice-9 popen) (ice-9 match)
+ (use-modules (ice-9 format) (ice-9 match)
(srfi srfi-1))
(call-with-output-file #$output
@@ -859,7 +851,7 @@ (define (sway-configuration->file conf)
\f
;;;
-;;; Definition of th Home Service.
+;;; Definition of the Home Service.
;;;
(define (sway-configuration->files sway-conf)
--
2.45.2
[-- Attachment #3: Type: text/plain, Size: 147 bytes --]
I also reindented the commit message and put a line break because the
last line did not fit on my terminal.
Thank you greatly!
Regards,
Florian
next prev parent reply other threads:[~2024-10-12 13:13 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 15:30 [bug#72714] [PATCH] home: services: Add 'home-sway-service-type' Arnaud Daby-Seesaram via Guix-patches via
2024-08-24 15:32 ` [bug#72714] [PATCH v2] " Arnaud Daby-Seesaram via Guix-patches via
2024-08-26 10:38 ` [bug#72714] [PATCH v3] " Arnaud Daby-Seesaram via Guix-patches via
2024-09-03 7:27 ` [bug#72714] [PATCH v4] " Arnaud Daby-Seesaram via Guix-patches via
2024-09-14 13:28 ` pelzflorian (Florian Pelz)
2024-09-14 14:06 ` pelzflorian (Florian Pelz)
2024-09-17 6:52 ` Arnaud Daby-Seesaram via Guix-patches via
2024-09-20 16:45 ` pelzflorian (Florian Pelz)
2024-09-22 13:43 ` Arnaud Daby-Seesaram via Guix-patches via
2024-09-25 6:58 ` pelzflorian (Florian Pelz)
2024-09-25 7:52 ` Arnaud Daby-Seesaram via Guix-patches via
2024-09-25 11:42 ` pelzflorian (Florian Pelz)
2024-09-18 8:15 ` [bug#72714] [PATCH v5] " Arnaud Daby-Seesaram via Guix-patches via
2024-09-18 18:56 ` Arnaud Daby-Seesaram via Guix-patches via
2024-09-22 8:14 ` Hilton Chain via Guix-patches via
2024-09-25 8:00 ` [bug#72714] [PATCH v6] " Arnaud Daby-Seesaram via Guix-patches via
2024-09-30 20:07 ` Ludovic Courtès
2024-10-01 22:12 ` [bug#72714] [PATCH] " Arnaud Daby-Seesaram via Guix-patches via
2024-10-02 14:08 ` pelzflorian (Florian Pelz)
2024-10-02 20:49 ` Arnaud Daby-Seesaram via Guix-patches via
2024-10-03 12:41 ` pelzflorian (Florian Pelz)
2024-10-03 20:53 ` Arnaud Daby-Seesaram via Guix-patches via
2024-10-04 20:17 ` pelzflorian (Florian Pelz)
2024-10-05 17:02 ` Arnaud Daby-Seesaram via Guix-patches via
2024-10-06 8:15 ` pelzflorian (Florian Pelz)
2024-10-06 9:05 ` Arnaud Daby-Seesaram via Guix-patches via
2024-10-06 9:51 ` pelzflorian (Florian Pelz)
2024-10-06 10:44 ` Arnaud Daby-Seesaram via Guix-patches via
2024-10-08 16:39 ` pelzflorian (Florian Pelz)
2024-10-08 22:33 ` [bug#72714] [PATCH v8] " Arnaud Daby-Seesaram via Guix-patches via
2024-10-12 13:11 ` pelzflorian (Florian Pelz) [this message]
2024-10-01 22:30 ` [bug#72714] [PATCH v7] " Arnaud Daby-Seesaram via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iktx79er.fsf@pelzflorian.de \
--to=pelzflorian@pelzflorian.de \
--cc=72714-done@debbugs.gnu.org \
--cc=ds-ac@nanein.fr \
--cc=hako@ultrarare.space \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.