1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

xdg-terminal-exec: minor cleanup of option description

This commit is contained in:
Robert Helgesson 2025-07-26 10:51:38 +02:00
parent 63dd0e9409
commit 42924f0eff
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -10,18 +10,16 @@ in
{
options = {
xdg.terminal-exec = {
enable = lib.mkEnableOption "xdg-terminal-exec, the [proposed](https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/46) Default Terminal Execution Specification";
enable = lib.mkEnableOption ''
xdg-terminal-exec, the
[proposed](https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/46)
Default Terminal Execution Specification'';
package = lib.mkPackageOption pkgs "xdg-terminal-exec" { nullable = true; };
settings = lib.mkOption {
type = with lib.types; attrsOf (listOf str);
default = { };
description = ''
Configuration options for the Default Terminal Execution Specification.
The keys are the desktop environments that are matched (case-insensitively) against `$XDG_CURRENT_DESKTOP`,
or `default` which is used when the current desktop environment is not found in the configuration.
The values are a list of terminals' [desktop file IDs](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-id) to try in order of decreasing priority.
'';
example = {
default = [ "kitty.desktop" ];
GNOME = [
@ -29,6 +27,13 @@ in
"org.gnome.Terminal.desktop"
];
};
description = ''
Configuration options for the Default Terminal Execution Specification.
The keys are the desktop environments that are matched (case-insensitively) against {env}`XDG_CURRENT_DESKTOP`,
or `default` which is used when the current desktop environment is not found in the configuration.
The values are a list of terminals' [desktop file IDs](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-id) to try in order of decreasing priority.
'';
};
};
};
@ -38,7 +43,8 @@ in
xdg.configFile = lib.mapAttrs' (
desktop: terminals:
# map desktop name such as GNOME to `.config/gnome-xdg-terminals.list`, default to `.config/xdg-terminals.list`
# Map desktop name such as GNOME to `.config/gnome-xdg-terminals.list`,
# default to `.config/xdg-terminals.list`.
lib.nameValuePair (
"${if desktop == "default" then "" else "${lib.toLower desktop}-"}xdg-terminals.list"
) { text = lib.concatLines terminals; }