Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnome-terminal: Add audibleBell option #1671

Merged

Conversation

sestrella
Copy link
Contributor

@sestrella sestrella commented Dec 22, 2020

Description

Turn on/off the terminal's bell. A small video showcasing how the audible-bell key controls the terminal's bell:

Screencast from 12-21-2020 09_18_36 PM

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

Turn on/off the terminal's bell
@sestrella sestrella requested a review from rycee as a code owner December 22, 2020 02:22
@sestrella
Copy link
Contributor Author

sestrella commented Dec 22, 2020

@rycee since donf stores all keys in a single binary file it was not possible to write a simple assertion over a file. I tried to call dconf read instead without too much luck, I didn't commit the test itself since it is not working but here is what I have so far:

{ config, lib, pkgs, ... }:

let
  profileId = "6a6bc359-397f-41e1-9e84-61f23994f89f";
in {
  config = {
    home.packages = [
      pkgs.dconf
    ];

    programs.gnome-terminal = {
      enable = true;
      profile = {
        "${profileId}" = {
          default = true;
          visibleName = "test";
          audibleBell = false;
        };
      };
    };

    nmt.script = ''
      audibleBell=$(HOME=/tmp $TESTED/home-path/bin/dconf read /org/gnome/terminal/legacy/profiles:/:${profileId}/audible-bell)
      [ $audibleBell == "false" ] || fail "Expected false, got $audibleBell"
    '';
  };
}

@rycee
Copy link
Member

rycee commented Dec 22, 2020 via email

@teto teto merged commit cd86c26 into nix-community:master Dec 27, 2020
malte-v pushed a commit to malte-v/home-manager that referenced this pull request Feb 24, 2021
aakropotkin pushed a commit to aakropotkin/home-manager that referenced this pull request Feb 28, 2021
cab404 pushed a commit to cab404/home-manager that referenced this pull request Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants