4

On my laptop, when I press the volumeup/volumedown key, the sound lever go up/down by 10 units.

I can check that with alsamixer: when I press volume up, the sound level indeed go up by 10 points.

But I would like these keys to be less sensible: it would be nice if the level could go up/down by 5 points when I press a key (volume up/volume down).

I know that these rules are configured in /lib/udev/hwdb.d, but the only thing I found in these files is the use of the "volumeup" and "volumedown" keywords, but not the amount the button increase/decrease.

How could I do that ?

Is there a config file somewhere ?

Edit

I'm on arch, and I would like to know where the config is stored (if there is one)

I'm using pulseaudio, I don't know if this can help

rambi
  • 133
  • 7
  • 1
    You may be able to do it with a GUI, depending on your DE. In LXQt you just right click on the volume icon in the tray and "Configure Volume Controls". – KGIII May 07 '21 at 16:36
  • 1
    It entirely depends on what your system uses to process the volume up/down keys. On my laptop, this doesn't work out of the box, and I've done this within fvwm, and I can control the percentage by changing the configuration. Very likely your Desktop does the same out of the box for you, so that's where you need to start looking: the configuration of your Desktop/Window Manager. – dirkt May 14 '21 at 14:02
  • I found it ! The line was here frome the begining, I feel a bit dumb right now... Thanks ! – rambi May 14 '21 at 14:12

1 Answers1

1

As far as i am concerned this is not a pulseaudio thing and depends on which DE or WM you are using I have never used a DE with arch but for WM's this is configured in their configuration files like for

  • i3 (~/.config/i3/config)
#change volume
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%-
bindsym XF86AudioMute exec amixer -q -D pulse set Master toggle
  • for configuration in dwm (go to dwm dir and configure config.h)
#include <X11/XF86keysym.h>
{ 0,  XF86XK_AudioLowerVolume,  spawn,  SHCMD("amixer -q set Master 5%- ") },
{ 0,  XF86XK_AudioRaiseVolume,  spawn,  SHCMD("amixer -q set Master 5%+ ") },
  • for qtiles (.config/qtile/config.py)
([], "XF86AudioLowerVolume",  lazy.spawn('amixer -q set Master 3%-')),
([], "XF86AudioRaiseVolume",  lazy.spawn('amixer -q set Master 3%+')),
tycoon
  • 150
  • 7