Suivant: , Précédent: , Monter: Services du dossier personnel   [Table des matières][Index]


13.3.8 Services personnels pour ordinateur de bureau

Le module (gnu home services desktop) fournit des services que vous trouverez pratique sur un système « de bureau » possédant un environnement utilisateur graphique comme Xorg.

Variable :home-x11-service-type

This is the service type representing the X Window graphical display server (also referred to as “X11”).

X Window is necessarily started by a system service; on Guix System, starting it is the responsibility of gdm-service-type and similar services (voir Système de fenêtrage X). At the level of Guix Home, as an unprivileged user, we cannot start X Window; all we can do is check whether it is running. This is what this service does.

As a user, you probably don’t need to worry or explicitly instantiate home-x11-service-type. Services that require an X Window graphical display, such as home-redshift-service-type below, instantiate it and depend on its corresponding x11-display Shepherd service (voir Gérer les démons personnels).

When X Window is running, the x11-display Shepherd service starts and sets the DISPLAY environment variable of the shepherd process, using its original value if it was already set; otherwise, it fails to start.

The service can also be forced to use a given value for DISPLAY, like so:

herd start x11-display :3

In the example above, x11-display is instructed to set DISPLAY to :3.

Variable :home-redshift-service-type

Il s’agit du type de service pour Redshift, un programme qui ajuste la température des couleurs de l’affichage suivant l’heure de la journée. Sa valeur associée doit être un home-redshift-configuration comme indiqué ci-dessous.

Une configuration typique, où nous spécifions la latitude et la longitude manuellement, ressemblerait à ceci :

(service home-redshift-service-type
         (home-redshift-configuration
          (location-provider 'manual)
          (latitude 35.81)    ;hémisphère nord
          (longitude -0.80))) ;ouest de Greenwich
Type de données :home-redshift-configuration

Les champs de home-redshift-configuration disponibles sont :

redshift (par défaut : redshift) (type : simili-fichier)

Le paquet Redshift à utiliser.

location-provider (par défaut : geoclue2) (type : symbol)

Fournisseur de géolocalisation — 'manual ou 'geoclue2. Dans le premier cas, vous devez aussi spécifier les champs latitude et longitude pour que Redshift puisse déterminer les heures de jour et de nuit là où vous vous trouve. Dans le deuxième cas, le service système Geoclue doit être lancé ; Redshift lui demandera les informations de localisation.

adjustment-method (par défaut : randr) (type : symbol)

Méthode d’ajustement des couleurs.

daytime-temperature (par défaut : 6500) (type : integer)

Température des couleurs pour le jour (en kelvins).

nighttime-temperature (par défaut : 4500) (type : entier)

Température des couleurs pour la nuit (en kelvins).

daytime-brightness (type : peut-être-nombre-inexact)

Luminosité de l’écran en journée, entre 0.1 et 1.0, ou non spécifiée.

nighttime-brightness (type : peut-être-nombre-inexact)

Luminosité de l’écran la nuit, entre 0.1 et 1.0, ou non spécifiée.

latitude (type : peut-être-nombre-inexact)

Latitude, lorsque location-provider est 'manual.

longitude (type : peut-être-nombre-inexact)

Longitude, lorsque location-provider est 'manual.

dawn-time (type : peut-être-chaine)

Heure personnalisée de transition entre la nuit et le jour le matin — au format "HH:MM". Lorsque la valeur est spécifiée, l’élévation du soleil n’est pas utilisée pour déterminer le cycle jour-nuit.

dusk-time (type : peut-être-chaine)

De même, heure personnalisée pour la transition entre le jour et la nuit en soirée.

extra-content (par défaut : "") (type : raw-configuration-string)

Contenu supplémentaire ajouté tel quel à la fin du fichier de configuration de Redshift. Lancez man redshift pour plus d’informations sur le format du fichier de configuration.

Variable :home-dbus-service-type

C’est le type de service pour lancer un D-Bus spécifique à la session, pour les applications non privilégiées qui nécessitent que D-Bus soit lancé.

Type de données :home-dbus-configuration

L’enregistrement de configuration pour home-dbus-service-type.

dbus (par défaut : dbus)

Le paquet qui fournit la commande /bin/dbus-daemon.

Variable :home-unclutter-service-type

This is the service type for Unclutter, a program that runs on the background of an X11 session and detects when the X pointer hasn’t moved for a specified idle timeout, after which it hides the cursor so that you can focus on the text underneath. Its associated value must be a home-unclutter-configuration record, as shown below.

A typical configuration, where we manually specify the idle timeout (in seconds), might look like this:

Data Type :home-unclutter-configuration

The configuration record for home-unclutter-service-type.

unclutter (default: unclutter) (type: file-like)

Unclutter package to use.

idle-timeout (default: 5) (type: integer)

A timeout in seconds after which to hide cursor.

Variable :home-xmodmap-service-type

This is the service type for the xmodmap utility to modify keymaps and pointer button mappings under the Xorg display server. Its associated value must be a home-xmodmap-configuration record, as shown below.

The key-map field takes a list of objects, each of which is either a statement (a string) or an assignment (a pair of strings). As an example, the snippet below swaps around the Caps_Lock and the Control_L keys, by first removing the keysyms (on the right-hand side) from the corresponding modifier maps (on the left-hand side), re-assigning them by swapping each other out, and finally adding back the keysyms to the modifier maps.

(service home-xmodmap-service-type
         (home-xmodmap-configuration
          (key-map '(("remove Lock" . "Caps_Lock")
                     ("remove Control" . "Control_L")
                     ("keysym Control_L" . "Caps_Lock")
                     ("keysym Caps_Lock" . "Control_L")
                     ("add Lock" . "Caps_Lock")
                     ("add Control" . "Control_L")))))
Data Type :home-xmodmap-configuration

The configuration record for home-xmodmap-service-type. Its available fields are:

xmodmap (default: xmodmap) (type: file-like)

The xmodmap package to use.

key-map (default: '()) (type: list)

The list of expressions to be read by xmodmap on service startup.


Suivant: Services personnels Guix, Précédent: GNU Privacy Guard, Monter: Services du dossier personnel   [Table des matières][Index]