summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-05-06 23:02:25 +0900
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-05-26 13:43:03 +0900
commit900d1fdbffd5cac95cd3699e5d89851275518559 (patch)
tree236f1dcc6868d74d856dc5481db238d7c5cf0aed
parentc743d646ee9104aa14d066cdf6657a0fac82ebea (diff)
services: Add vte-integration-service-type.
* gnu/services.scm (vte-integration-service-type): New service type. * doc/guix.texi (Service Reference): Document it. Change-Id: I7e4bc1b913b50a5a061894f9ddef27f1877b62a2
-rw-r--r--doc/guix.texi15
-rw-r--r--gnu/services.scm15
2 files changed, 30 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 1bb9ce9fbe..65c64f022e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -47700,6 +47700,21 @@ like so:
@end example
@end defvar
+@defvar vte-integration-service-type
+This services adds the @file{/etc/bashrc.d/vte.sh} to your system, which
+improves the Bash and Zsh experience when using VTE-powered terminal
+emulators. This causes for example the current directory to be
+displayed in the terminal emulator's tab title, and the current
+directory to be preserved when creating a new tab, among other features.
+The value of the service is the @code{vte} package to use.
+
+@example
+(use-package-modules gnome) ;for the `vte' package
+
+(service vte-integration-service-type vte)
+@end example
+@end defvar
+
@defvar privileged-program-service-type
Type for the ``privileged-program service''. This service collects lists of
executable file names, passed as gexps, and adds them to the set of
diff --git a/gnu/services.scm b/gnu/services.scm
index 159d357c3e..ce15a39d06 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -47,6 +47,7 @@
#:use-module (guix deprecation)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages gnome)
#:use-module (gnu packages hurd)
#:use-module (gnu packages linux)
#:use-module (gnu system privilege)
@@ -138,6 +139,7 @@
linux-builder-configuration-kernel
linux-builder-configuration-modules
linux-loadable-module-service-type
+ vte-integration-service-type
%boot-service
%activation-service
@@ -1027,6 +1029,19 @@ scripts having the @file{.sh} file extension, to be sourced by interactive
Bash shells.")
(default-value %default-etc-bashrc-d-files)))
+(define vte-integration-service-type
+ (service-type
+ (name 'vte-integration)
+ (extensions
+ (list (service-extension etc-bashrc-d-service-type
+ (lambda (vte)
+ (list (file-append
+ vte "/etc/profile.d/vte.sh"))))))
+ (default-value vte) ;the vte package to use
+ (description "A service for adding the @file{/etc/bashrc.d/vte.sh} script
+to your system, which improves the Bash and Zsh experience when using
+VTE-powered terminal emulators.")))
+
(define (privileged-program->activation-gexp programs)
"Return an activation gexp for privileged-program from PROGRAMS."
(let ((programs