Skip to content

sound.enableMediaKeys values in percent instead of hardware value #17068

@dermetfan

Description

@dermetfan

Issue description

sound.enableMediaKeys works, but changes the volume by +/- 1 (hardware value). In practice this makes no perceptible difference, at least on some systems. I'd like to propose to change by +/- 1 % instead.

I would send a PR but am not yet involved enough to try and test this myself. The necessary change is merely an additional %-sign in the amixer command line in nixos/modules/services/audio/alsa.nix:

# "Lower Volume" media key
{ keys = [ 114 ]; events = [ "key" "rep" ]; command = "${alsaUtils}/bin/amixer -q set Master 1%- unmute"; }

# "Raise Volume" media key
{ keys = [ 115 ]; events = [ "key" "rep" ]; command = "${alsaUtils}/bin/amixer -q set Master 1%+ unmute"; }

Technical details

  • System: 16.09pre85931.125ffff (Flounder)
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 16.09pre85931.125ffff

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new or improve an existing system.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions