mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 13:13:33 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
55 lines
1.2 KiB
Nix
55 lines
1.2 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
vteInitSnippet = ''
|
|
# Show current working directory in VTE terminals window title.
|
|
# Supports both bash and zsh, requires interactive shell.
|
|
. ${pkgs.vte.override { gtkVersion = null; }}/etc/profile.d/vte.sh
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
|
|
|
meta = {
|
|
maintainers = teams.gnome.members;
|
|
};
|
|
|
|
options = {
|
|
|
|
programs.bash.vteIntegration = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
description = ''
|
|
Whether to enable Bash integration for VTE terminals.
|
|
This allows it to preserve the current directory of the shell
|
|
across terminals.
|
|
'';
|
|
};
|
|
|
|
programs.zsh.vteIntegration = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
description = ''
|
|
Whether to enable Zsh integration for VTE terminals.
|
|
This allows it to preserve the current directory of the shell
|
|
across terminals.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
config = mkMerge [
|
|
(mkIf config.programs.bash.vteIntegration {
|
|
programs.bash.interactiveShellInit = mkBefore vteInitSnippet;
|
|
})
|
|
|
|
(mkIf config.programs.zsh.vteIntegration {
|
|
programs.zsh.interactiveShellInit = vteInitSnippet;
|
|
})
|
|
];
|
|
}
|